mirror of https://github.com/nicolargo/glances
Fix python3 in server mode
parent
fddca794a2
commit
b1a7f23943
|
@ -192,13 +192,14 @@ class GlancesInstance():
|
||||||
self.stats.update()
|
self.stats.update()
|
||||||
# Return the attribute
|
# Return the attribute
|
||||||
return getattr(self.stats, item)
|
return getattr(self.stats, item)
|
||||||
except Exception, e:
|
except Exception:
|
||||||
# The method is not found for the plugin
|
# The method is not found for the plugin
|
||||||
raise AttributeError(item)
|
raise AttributeError(item)
|
||||||
else:
|
else:
|
||||||
# Default behavior
|
# Default behavior
|
||||||
raise AttributeError(item)
|
raise AttributeError(item)
|
||||||
|
|
||||||
|
|
||||||
class GlancesServer():
|
class GlancesServer():
|
||||||
"""
|
"""
|
||||||
This class creates and manages the TCP server
|
This class creates and manages the TCP server
|
||||||
|
@ -212,8 +213,8 @@ class GlancesServer():
|
||||||
# Init the XML RPC server
|
# Init the XML RPC server
|
||||||
try:
|
try:
|
||||||
self.server = GlancesXMLRPCServer(bind_address, bind_port, requestHandler)
|
self.server = GlancesXMLRPCServer(bind_address, bind_port, requestHandler)
|
||||||
except Exception, err:
|
except Exception as err:
|
||||||
print(_("Error: Can not start Glances server (%s)") % err)
|
print(_("Error: Cannot start Glances server (%s)") % err)
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
# The users dict
|
# The users dict
|
||||||
|
|
Loading…
Reference in New Issue