aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazarr.py
diff options
context:
space:
mode:
authorLouis Vézina <[email protected]>2018-10-16 08:48:25 -0400
committerLouis Vézina <[email protected]>2018-10-16 08:48:25 -0400
commit8a1dc9e275e3a8f09fb09fe0903c0eb5619c6e0c (patch)
tree4a8a4c7992938b5cb91b9cff0d49ef3f30fb4b7b /bazarr.py
parent9c28c30ec8d3c95f7746d46ac8aeb664b3fdfbb3 (diff)
downloadbazarr-8a1dc9e275e3a8f09fb09fe0903c0eb5619c6e0c.tar.gz
bazarr-8a1dc9e275e3a8f09fb09fe0903c0eb5619c6e0c.zip
Flushing stdout buffer
Diffstat (limited to 'bazarr.py')
-rw-r--r--bazarr.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/bazarr.py b/bazarr.py
index 44dbd0828..adc39d7bc 100644
--- a/bazarr.py
+++ b/bazarr.py
@@ -2,16 +2,9 @@ import subprocess as sp
import threading
import time
import os
-import logging
import sys
import getopt
-log = logging.getLogger()
-log.setLevel(logging.DEBUG)
-out_hdlr = logging.StreamHandler(sys.stdout)
-out_hdlr.setLevel(logging.INFO)
-log.addHandler(out_hdlr)
-
arguments = []
try:
opts, args = getopt.getopt(sys.argv[1:],"h:",["no-update", "config="])
@@ -30,10 +23,11 @@ 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, stdin=sp.PIPE)
- logging.info("Bazarr starting...")
+ print "Bazarr starting..."
try:
for line in iter(ep.stdout.readline, ''):
sys.stdout.write(line)
+ sys.stdout.flush()
except KeyboardInterrupt:
pass
@@ -58,16 +52,16 @@ if __name__ == '__main__':
try:
os.remove(stopfile)
except:
- logging.error('Unable to delete stop file.')
+ print 'Unable to delete stop file.'
else:
- logging.info('Bazarr exited.')
+ print 'Bazarr exited.'
os._exit(0)
if os.path.exists(restartfile):
try:
os.remove(restartfile)
except:
- logging.error('Unable to delete restart file.')
+ print 'Unable to delete restart file.'
else:
start_bazarr()