This commit is contained in:
2022-10-09 15:53:40 +03:00
parent e3e8c02174
commit a628e561eb

View File

@@ -19,6 +19,6 @@ class Update:
@staticmethod
def restart_bot():
if sys.argv[1] == 'restart':
if len(sys.argv >= 2) and sys.argv[1] == 'restart':
return
os.execvp(sys.executable, [sys.executable, sys.argv[0], 'restart'])