mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Re-add get_hostname method - needed for host details page
This commit is contained in:
parent
e23cb027a4
commit
5827abcc1f
@ -169,6 +169,17 @@ class vmmConnection(gobject.GObject):
|
||||
logging.warning("Unable to resolve local hostname for machine")
|
||||
return "localhost"
|
||||
|
||||
def get_hostname(self):
|
||||
try:
|
||||
(scheme, netloc, path, query, fragment) = self.uri_split()
|
||||
|
||||
if netloc != "":
|
||||
return netloc
|
||||
except Exception, e:
|
||||
logging.warning("Cannot parse URI %s: %s" % (self.uri, str(e)))
|
||||
|
||||
return self.get_local_hostname()
|
||||
|
||||
def get_name(self):
|
||||
try:
|
||||
(scheme, netloc, path, query, fragment) = self.uri_split()
|
||||
|
Loading…
Reference in New Issue
Block a user