Don't error gruesomely when someone exports nonexistant graph
sys.path[0] to get basepath of fpdb script
This commit is contained in:
Regular → Executable
+2
-2
@@ -135,8 +135,8 @@ class GuiAutoImport (threading.Thread):
|
||||
self.pipe_to_hud = subprocess.Popen(command, bufsize = bs, stdin = subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
else:
|
||||
# command = os.path.join(os.getcwd(), 'HUD_main.py') # clearly doesn't work if you run from somewhere else.
|
||||
command = self.config.execution_path('HUD_main.py') # Hi Ray. Sorry about this, kludging.
|
||||
command = os.path.join(sys.path[0], 'HUD_main.py')
|
||||
#command = self.config.execution_path('HUD_main.py') # Hi Ray. Sorry about this, kludging.
|
||||
bs = 1
|
||||
self.pipe_to_hud = subprocess.Popen((command, self.database), bufsize = bs, stdin = subprocess.PIPE,
|
||||
universal_newlines=True)
|
||||
|
||||
Reference in New Issue
Block a user