Skip to content

Commit

Permalink
re-start in interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanslack committed Jan 16, 2025
1 parent 32a0318 commit 5ec21ad
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions videomass/gui_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,14 @@ def OnExit(self):
return False

if self.appset['auto-restart-app']:
auto_restart(self.appset['ostype'],
self.appset['app'],
self.appset['make_portable'],
)
auto_restart(self.appset['app'], self.appset['make_portable'])
return True

return True
# -------------------------------------------------------------------


def auto_restart(ostype, apptype, portmode):
def auto_restart(apptype, portmode):
"""
This function spawn the same executable again, automatically
restarting this application if required, for example after
Expand All @@ -253,7 +250,7 @@ def auto_restart(ostype, apptype, portmode):
it is disabled using the Python interpreter (interactive
mode).
"""
if not ''.join(sys.argv):
if not ''.join(sys.argv) or sys.argv[0].startswith('-'):
sys.exit()

if apptype == 'pyinstaller':
Expand Down

0 comments on commit 5ec21ad

Please sign in to comment.