Skip to content

Commit

Permalink
trivial: python style + lint fixes
Browse files Browse the repository at this point in the history
- style checker udpate is complaining about commented out line; remove.
- remove unused import
- fix other trivial python lints

Signed-off-by: Gerwin Klein <[email protected]>
  • Loading branch information
lsf37 committed Jul 12, 2024
1 parent 850646f commit e0d2878
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Hardware/VMware/seL4vmw.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@

import os
import sys
import subprocess
import random
import time

# Configuration

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
Expand All @@ -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)

Expand Down Expand Up @@ -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))
Expand All @@ -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()
Expand Down

0 comments on commit e0d2878

Please sign in to comment.