tools/xenmon: Fix xenmon.py for with python3.x
PATCH 1/1 tools/xenmon: Fix xenmon.py for with python3.x
Fixes for Py3:
* class Delayed(): file not defined; also an error for pylint -E
* Inconsistent use of tabs and spaces for indentation (in one block)
--- tools/xenmon/xenmon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/xenmon/xenmon.py +3 -3
@@ -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(): 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"
Signature · 1 line
2.34.1
Quoted 5 lines · Bernhard Kaindl
Fixes for Py3:
* classDelayed(): file not defined; also an error for pylint -E
* Inconsistent use of tabs and spaces for indentation (in one block)Signed-off-by Bernhard Kaindl <[email protected]>
I'll add this to my pending queue while staging is blocked.
~Andrew
Quoted 9 lines · Andrew Cooper
Quoted 5 lines · Bernhard Kaindl
Fixes for Py3:
* classDelayed(): file not defined; also an error for pylint -E
* Inconsistent use of tabs and spaces for indentation (in one block)Signed-off-by Bernhard Kaindl <[email protected]>Acked-by Andrew Cooper <[email protected]>I'll add this to my pending queue while staging is blocked.
Actually, on second thoughts. Class DomainInfo and Delayed need to inherit from object for Py2 reasons. Inheriting from file did this previously.
I can fix up on commit, if you're happy.
~Andrew
Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Andrew Cooper
Quoted 5 lines · Bernhard Kaindl
Fixes for Py3:
* classDelayed(): file not defined; also an error for pylint -E
* Inconsistent use of tabs and spaces for indentation (in one block)Signed-off-by Bernhard Kaindl <[email protected]>
Quoted 8 lines
Quoted 3 lines
Acked-by Andrew Cooper <[email protected]>I'll add this to my pending queue while staging is blocked.
Actually, on second thoughts. Class DomainInfo and Delayed need to inherit from object for Py2 reasons. Inheriting from file did this previously.
I can fix up on commit, if you're happy.
Yes, thanks!
Signature · 1 line
cu, Bernhard