Python 3.8 complains: GEN /home/ralf/jailhouse/tools/jailhouse-config-collect /home/ralf/jailhouse/tools/jailhouse-config-create:230: SyntaxWarning: "is" with a literal. Did you mean "=="? if ((options.root is '/') and (os.geteuid() is not 0)): /home/ralf/jailhouse/tools/jailhouse-config-create:230: SyntaxWarning: "is not" with a literal. Did you mean "!="? if ((options.root is '/') and (os.geteuid() is not 0)):
Fix it. And remove some parentheses. Signed-off-by: Ralf Ramsauer <[email protected]> --- tools/jailhouse-config-create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create index 46de3f65..e746dbf1 100755 --- a/tools/jailhouse-config-create +++ b/tools/jailhouse-config-create @@ -227,7 +227,7 @@ if options.generate_collector: f.close() sys.exit(0) -if ((options.root is '/') and (os.geteuid() is not 0)): +if options.root == '/' and os.geteuid() != 0: print('ERROR: You have to be root to work on "/"!', file=sys.stderr) sys.exit(1) -- 2.24.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20191125162437.1327636-1-ralf.ramsauer%40oth-regensburg.de.
