From a6aba8b2a77a9d43c79faa371d7df55a88f6fd26 Mon Sep 17 00:00:00 2001 From: Elliot Chernofsky <35854880+emtuls@users.noreply.github.com> Date: Wed, 17 Dec 2025 17:37:24 -0500 Subject: [PATCH] Fix issues raised by linter (#738) * fix linter issue with quotes * fix issue with common.vm cmdlet not recognized --- virtualbox/vbox-build-flare-vm.py | 5 ++++- virtualbox/vboxcommon.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/virtualbox/vbox-build-flare-vm.py b/virtualbox/vbox-build-flare-vm.py index 9f09027..81e551f 100755 --- a/virtualbox/vbox-build-flare-vm.py +++ b/virtualbox/vbox-build-flare-vm.py @@ -229,7 +229,10 @@ def build_vm(vm_name, exported_vm_name, snapshots, date, custom_config, do_not_i notice_file_name = snapshot.get("legal_notice", None) if notice_file_name: notice_file_path = rf"C:\Users\{GUEST_USERNAME}\Desktop\{notice_file_name}" - set_notice_cmd = f"Import-Module $env:VM_COMMON_DIR\\vm.common\\vm.common.psm1; VM-Set-Legal-Notice (Get-Content '{notice_file_path}' -Raw)" + set_notice_cmd = ( + f"Import-Module $env:VM_COMMON_DIR\\vm.common\\vm.common.psm1; " + f"VM-Set-Legal-Notice (Get-Content '{notice_file_path}' -Raw)" + ) run_command(vm_uuid, set_notice_cmd) # Perform clean up: run 'VM-Clean-Up' excluding configured files and folders diff --git a/virtualbox/vboxcommon.py b/virtualbox/vboxcommon.py index 49f58a9..8e298f8 100644 --- a/virtualbox/vboxcommon.py +++ b/virtualbox/vboxcommon.py @@ -53,7 +53,7 @@ def __run_vboxmanage(cmd, real_time=False): # which can cause conflicts with external binaries like VBoxManage. # We create a clean environment for the subprocess to use the system's libraries. env = os.environ.copy() - if getattr(sys, 'frozen', False) and "LD_LIBRARY_PATH" in env: + if getattr(sys, "frozen", False) and "LD_LIBRARY_PATH" in env: # 'sys.frozen' is True when running from a PyInstaller executable. # We can either remove the variable or, more safely, restore the original # one if PyInstaller saved it. PyInstaller often saves it as LD_LIBRARY_PATH_ORIG.