Davidlzl / huhamhire-hosts

Automatically exported from code.google.com/p/huhamhire-hosts
0 stars 0 forks source link

archlinux get hostname wrong #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Archlinux System
2. Pyhton2
3. file: hosts_setup_OnL.py v1.2.3 
   url: 
 http://sourceforge.net/projects/huhamhirehosts/files/hosts%20v1.2.3/hosts_setup_OnL.py/download
What is the expected output? What do you see instead?
set_os 返回hostname有问题, 因为archlinux 没有/etc/hostname文件

What version of the product are you using? On what operating system?
hosts_setup_OnL.py v1.2.3 on Archlinux x86_64, python2.7

Please provide any additional information below.
建议用os.system('hostsname')

Original issue reported on code.google.com by zhulianh...@gmail.com on 13 May 2012 at 3:05

GoogleCodeExporter commented 8 years ago
使用sourceforge上 latest PyHosts 
中的最新版以解决此问题,GoogleCode上已更新最新版

此问题是因为初始设计仅考虑了Debian 
Linux下的情况,最新版已使用socket.gethostname()修正

谢谢你的回复 ;-)

Original comment by hujunx...@gmail.com on 16 May 2012 at 12:44

Attachments: