mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-21 23:32:31 +00:00
no log: pep8 fix
This commit is contained in:
parent
abc4500443
commit
03dc2109f3
1 changed files with 9 additions and 9 deletions
14
bazarr.py
14
bazarr.py
|
@ -77,7 +77,7 @@ def get_stop_status_code(input_file):
|
|||
except (ValueError, TypeError):
|
||||
status_code = EXIT_NORMAL
|
||||
file.close()
|
||||
except:
|
||||
except Exception:
|
||||
status_code = EXIT_NORMAL
|
||||
return status_code
|
||||
|
||||
|
@ -87,9 +87,9 @@ def check_status():
|
|||
if os.path.exists(stop_file):
|
||||
status_code = get_stop_status_code(stop_file)
|
||||
try:
|
||||
print(f"Deleting stop file...")
|
||||
print("Deleting stop file...")
|
||||
os.remove(stop_file)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
print('Unable to delete stop file.')
|
||||
finally:
|
||||
terminate_child()
|
||||
|
@ -97,13 +97,13 @@ def check_status():
|
|||
|
||||
if os.path.exists(restart_file):
|
||||
try:
|
||||
print(f"Deleting restart file...")
|
||||
print("Deleting restart file...")
|
||||
os.remove(restart_file)
|
||||
except Exception:
|
||||
print('Unable to delete restart file.')
|
||||
finally:
|
||||
terminate_child()
|
||||
print(f"Bazarr is restarting...")
|
||||
print("Bazarr is restarting...")
|
||||
child_process = start_bazarr()
|
||||
|
||||
|
||||
|
@ -116,7 +116,7 @@ def interrupt_handler(signum, frame):
|
|||
interrupted = True
|
||||
print('Handling keyboard interrupt...')
|
||||
else:
|
||||
print(f"Stop doing that! I heard you the first time!")
|
||||
print("Stop doing that! I heard you the first time!")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -148,5 +148,5 @@ if __name__ == '__main__':
|
|||
time.sleep(5)
|
||||
except (KeyboardInterrupt, SystemExit, ChildProcessError):
|
||||
# this code should never be reached, if signal handling is working properly
|
||||
print(f'Bazarr exited main script file via keyboard interrupt.')
|
||||
print('Bazarr exited main script file via keyboard interrupt.')
|
||||
exit_program(EXIT_INTERRUPT)
|
||||
|
|
Loading…
Reference in a new issue