From e0d2878bff0c4b0524bf8da181dff511fa96ca75 Mon Sep 17 00:00:00 2001 From: Gerwin Klein Date: Thu, 11 Jul 2024 16:05:08 +1000 Subject: [PATCH] trivial: python style + lint fixes - style checker udpate is complaining about commented out line; remove. - remove unused import - fix other trivial python lints Signed-off-by: Gerwin Klein --- Hardware/VMware/seL4vmw.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Hardware/VMware/seL4vmw.py b/Hardware/VMware/seL4vmw.py index d3f12cb006..5e61cc2034 100644 --- a/Hardware/VMware/seL4vmw.py +++ b/Hardware/VMware/seL4vmw.py @@ -7,7 +7,6 @@ import os import sys -import subprocess import random import time @@ -15,7 +14,7 @@ vm_num = 4 vm_name = 'seL4vmw' -vm_gui = False if not "-gui" in sys.argv else True +vm_gui = False if "-gui" not in sys.argv else True vm_leave_on = False # Variables @@ -33,7 +32,7 @@ def xc(cmd, allow_fail=False): ret = os.system(cmd) - if ret != 0 and allow_fail == False: + if ret != 0 and not allow_fail: print("### ERROR: command %s failed. Exiting." % cmd) sys.exit(1) @@ -115,7 +114,7 @@ def main(): VMoff() # Copy the files into VMDK. - if vm_leave_on == False: + if not vm_leave_on: xc('rm -rf %s > /dev/null' % mnt_dir, True) xc('mkdir %s' % mnt_dir) xc('vmware-mount %s %s' % (vmdk_file, mnt_dir)) @@ -129,7 +128,6 @@ def main(): print("waiting 1 seconds for VM to boot...") time.sleep(1) - #xc('less -r +F %s' % vcom_file, True); xc('tail -F %s' % vcom_file, True) VMoff()