aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazarr.py
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2024-04-20 10:50:32 -0400
committermorpheus65535 <[email protected]>2024-04-20 10:50:32 -0400
commit03dc2109f3b5dcb8b4d93321c8df595ea6bce08d (patch)
tree0a62195110e91d295bc509a064c41c3d23648830 /bazarr.py
parentabc4500443830c5b175a51790b0def38b1a719f7 (diff)
downloadbazarr-03dc2109f3b5dcb8b4d93321c8df595ea6bce08d.tar.gz
bazarr-03dc2109f3b5dcb8b4d93321c8df595ea6bce08d.zip
no log: pep8 fix
Diffstat (limited to 'bazarr.py')
-rw-r--r--bazarr.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/bazarr.py b/bazarr.py
index 58284ca09..7e75272b0 100644
--- a/bazarr.py
+++ b/bazarr.py
@@ -60,7 +60,7 @@ def start_bazarr():
ep = subprocess.Popen(script, stdout=None, stderr=None, stdin=subprocess.DEVNULL, env=os.environ)
print(f"Bazarr starting child process with PID {ep.pid}...")
return ep
-
+
def terminate_child():
print(f"Terminating child process with PID {child_process.pid}")
@@ -69,7 +69,7 @@ def terminate_child():
def get_stop_status_code(input_file):
try:
- with open(input_file,'r') as file:
+ with open(input_file, 'r') as file:
# read status code from file, if it exists
line = file.readline()
try:
@@ -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)