Revision c8a0948f lib/utils.py
b/lib/utils.py | ||
---|---|---|
418 | 418 |
self.name, self.aliases, self.ipaddrs = self.LookupHostname(name) |
419 | 419 |
self.ip = self.ipaddrs[0] |
420 | 420 |
|
421 |
def ShortName(self): |
|
422 |
"""Returns the hostname without domain. |
|
423 |
|
|
424 |
""" |
|
425 |
return self.name.split('.')[0] |
|
426 |
|
|
421 | 427 |
@staticmethod |
422 | 428 |
def SysName(): |
423 | 429 |
"""Return the current system's name. |
Also available in: Unified diff