mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/xenmon: Fix xenmon.py for with python3.x
Fixes for Py3: * class Delayed(): file not defined; also an error for pylint -E. Inherit object instead for Py2 compatibility. Fix DomainInfo() too. * Inconsistent use of tabs and spaces for indentation (in one block) Signed-off-by: Bernhard Kaindl <bernhard.kaindl@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
1 parent
d69ccf52ad
commit
3a59443c1d
1 file changed
+4
-4
@@ -117,7 +117,7 @@ def setup_cmdline_parser():
|
||||
return parser
|
||||
|
||||
# encapsulate information about a domain
|
||||
class DomainInfo:
|
||||
class DomainInfo(object):
|
||||
def __init__(self):
|
||||
self.allocated_sum = 0
|
||||
self.gotten_sum = 0
|
||||
@@ -533,7 +533,7 @@ def show_livestats(cpu):
|
||||
# simple functions to allow initialization of log files without actually
|
||||
# physically creating files that are never used; only on the first real
|
||||
# write does the file get created
|
||||
class Delayed(file):
|
||||
class Delayed(object):
|
||||
def __init__(self, filename, mode):
|
||||
self.filename = filename
|
||||
self.saved_mode = mode
|
||||
@@ -677,8 +677,8 @@ def main():
|
||||
|
||||
if os.uname()[0] == "SunOS":
|
||||
xenbaked_cmd = "/usr/lib/xenbaked"
|
||||
stop_cmd = "/usr/bin/pkill -INT -z global xenbaked"
|
||||
kill_cmd = "/usr/bin/pkill -KILL -z global xenbaked"
|
||||
stop_cmd = "/usr/bin/pkill -INT -z global xenbaked"
|
||||
kill_cmd = "/usr/bin/pkill -KILL -z global xenbaked"
|
||||
else:
|
||||
# assumes that xenbaked is in your path
|
||||
xenbaked_cmd = "xenbaked"
|
||||
|
||||