Skip to content

Commit 5ca0bb1

Browse files
committed
Removed a few print calls
1 parent 3262e7e commit 5ca0bb1

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

__main__.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
import os
33
import sys
44

5+
# If Grabber is run from start menu, working directory is set to system32, this changes to file location.
6+
if os.getcwd().lower() == r'c:\windows\system32'.lower(): # Bit of a hack, but if you have this, your fault
7+
# Check if running as script, or executable.
8+
if getattr(sys, 'frozen', False):
9+
application_path = os.path.dirname(sys.executable)
10+
else:
11+
application_path = os.path.dirname(__file__)
12+
os.chdir(os.path.realpath(application_path))
13+
514
from PyQt5.QtCore import Qt
615
from PyQt5.QtWidgets import QApplication, QMessageBox
716

@@ -10,21 +19,9 @@
1019
from utils.utilities import SettingsError, ProfileLoadError
1120

1221

13-
# TODO: Notify on failure to write settings/profiles
1422
def main():
1523
while True:
1624
try:
17-
# If Grabber is run from start menu search, under specific conditions,
18-
# working directory is set to system32, this changes to file location as to not break anything.
19-
20-
if os.getcwd().lower() == r'c:\windows\system32'.lower(): # Bit of a hack, but if you have this, your fault
21-
# Check if running as script, or executable.
22-
if getattr(sys, 'frozen', False):
23-
application_path = os.path.dirname(sys.executable)
24-
else:
25-
application_path = os.path.dirname(__file__)
26-
os.chdir(os.path.realpath(application_path))
27-
2825
app = QApplication(sys.argv)
2926
program = GUI()
3027

0 commit comments

Comments
 (0)