aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazarr.py
diff options
context:
space:
mode:
authorLouis Vézina <[email protected]>2018-10-14 09:32:16 -0400
committerLouis Vézina <[email protected]>2018-10-14 09:32:16 -0400
commit9c28c30ec8d3c95f7746d46ac8aeb664b3fdfbb3 (patch)
tree7f29157b149e44d17a527fdcdda77b8d703826b3 /bazarr.py
parentbf02d0775962b2379607692a8a54e938e86a21eb (diff)
downloadbazarr-9c28c30ec8d3c95f7746d46ac8aeb664b3fdfbb3.tar.gz
bazarr-9c28c30ec8d3c95f7746d46ac8aeb664b3fdfbb3.zip
Add link to restart and manage KeyboardInterrupt
Diffstat (limited to 'bazarr.py')
-rw-r--r--bazarr.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bazarr.py b/bazarr.py
index d9cc8f0d4..44dbd0828 100644
--- a/bazarr.py
+++ b/bazarr.py
@@ -29,10 +29,13 @@ dir_name = os.path.dirname(__file__)
def start_bazarr():
script = [sys.executable, os.path.normcase(os.path.join(globals()['dir_name'], 'bazarr/main.py'))] + globals()['arguments']
- ep = sp.Popen(script, stdout=sp.PIPE, stderr=sp.STDOUT)
+ ep = sp.Popen(script, stdout=sp.PIPE, stderr=sp.STDOUT, stdin=sp.PIPE)
logging.info("Bazarr starting...")
- for line in iter(ep.stdout.readline, ''):
- sys.stdout.write(line)
+ try:
+ for line in iter(ep.stdout.readline, ''):
+ sys.stdout.write(line)
+ except KeyboardInterrupt:
+ pass
if __name__ == '__main__':