1 Star 1 Fork 107

ctyunsystem/anaconda

forked from src-openEuler/anaconda 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-hostname-info.patch 1.85 KB
一键复制 编辑 原始数据 按行查看 历史
t.feng 提交于 2020-07-01 19:07 . update
From 8ecae3e85d9eeedb131dbc026dcdf5bba95cdb15 Mon Sep 17 00:00:00 2001
From: t_feng <fengtao40@huawei.com>
Date: Thu, 18 Jun 2020 17:13:47 +0800
Subject: [PATCH] fix hostname info
---
po/zh_CN.po | 6 +++---
pyanaconda/network.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 0a4d1cd..be8cefe 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -2365,11 +2365,11 @@ msgstr "本地主机名绝不能以句号\".\"结尾。"
#: pyanaconda/network.py:119
msgid ""
"Host names can only contain the characters 'a-z', 'A-Z', '0-9', '-', or '.', "
-"parts between periods must contain something and cannot start or end with "
-"'-'."
+"parts between periods must contain something being 63 or fewer "
+"characters and cannot start or end with '-'."
msgstr ""
"主机名只能包含 'a-z', 'A-Z', '0-9', '-'(英文减号), 或者 '.'(英文点号),其"
-"中两个点号中不能为空且不能以'-'开头或结尾。"
+"中两个点号中不能为空,必须少于64个字符且不能以'-'开头或结尾。"
#: pyanaconda/network.py:465
msgid "Status not available"
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index f8e9b19..127a1bd 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -118,8 +118,8 @@ def is_valid_hostname(hostname, local=False):
if not re.match('^' + HOSTNAME_PATTERN_WITHOUT_ANCHORS + '$', hostname):
return (False, _("Host names can only contain the characters 'a-z', "
"'A-Z', '0-9', '-', or '.', parts between periods "
- "must contain something and cannot start or end with "
- "'-'."))
+ "must contain something being 63 or fewer "
+ "characters and cannot start or end with '-'."))
return (True, "")
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ctyunsystem/anaconda.git
git@gitee.com:ctyunsystem/anaconda.git
ctyunsystem
anaconda
anaconda
master

搜索帮助