From ff4ee713b1c3a1255e76b8cc5339162c0fbb7695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Thu, 9 Nov 2017 16:39:30 +0100 Subject: [PATCH] Removed unnecessary global variables Removed three variables set to global, which were all used only in their respective "main" function. --- qubesmanager/bootfromdevice.py | 2 -- qubesmanager/global_settings.py | 3 --- qubesmanager/settings.py | 2 -- 3 files changed, 7 deletions(-) diff --git a/qubesmanager/bootfromdevice.py b/qubesmanager/bootfromdevice.py index b33e6d4..be1d4c0 100644 --- a/qubesmanager/bootfromdevice.py +++ b/qubesmanager/bootfromdevice.py @@ -114,8 +114,6 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog, QtGui.QDialog): parser = firewall.qubesadmin.tools.QubesArgumentParser(vmname_nargs=1) def main(args=None): - global bootfromdevice_window - args = parser.parse_args(args) vm = args.domains.pop() diff --git a/qubesmanager/global_settings.py b/qubesmanager/global_settings.py index 2863f9f..96f0fab 100644 --- a/qubesmanager/global_settings.py +++ b/qubesmanager/global_settings.py @@ -314,8 +314,6 @@ def handle_exception(exc_type, exc_value, exc_traceback): def main(): - - global qtapp qtapp = QtGui.QApplication(sys.argv) qtapp.setOrganizationName("The Qubes Project") qtapp.setOrganizationDomain("http://qubes-os.org") @@ -325,7 +323,6 @@ def main(): app = Qubes() - global global_window global_window = GlobalSettingsWindow(qtapp, app) global_window.show() diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index cc53ebe..d3541bb 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -954,8 +954,6 @@ parser.set_defaults( ) def main(args=None): - global settings_window - args = parser.parse_args(args) vm = args.domains.pop()