FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 12-13-2011, 09:58 PM
David Lehman
 
Default Fix default hostname function to never return '(none)'.

---
pyanaconda/network.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index f9d50cf..0a781c5 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -113,7 +113,7 @@ def getDefaultHostname(anaconda):
hn = hinfo[0]
break

- if hn and hn != 'localhost' and hn != 'localhost.localdomain':
+ if hn and hn not in ('(none)', 'localhost', 'localhost.localdomain'):
return hn

try:
@@ -121,10 +121,10 @@ def getDefaultHostname(anaconda):
except:
hn = None

- if not hn or hn == '(none)' or hn == 'localhost' or hn == 'localhost.localdomain':
+ if not hn or hn in ('(none)', 'localhost', 'localhost.localdomain'):
hn = socket.gethostname()

- if not hn or hn == '(none)' or hn == 'localhost':
+ if not hn or hn in ('(none)', 'localhost'):
hn = 'localhost.localdomain'

return hn
--
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 01:17 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org