summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bazarr.py16
-rw-r--r--bazarr/main.py5
2 files changed, 8 insertions, 13 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()
diff --git a/bazarr/main.py b/bazarr/main.py
index 4804312ec..cbb8c87a1 100644
--- a/bazarr/main.py
+++ b/bazarr/main.py
@@ -1692,9 +1692,10 @@ import warnings
warnings.simplefilter("ignore", DeprecationWarning)
server = CherryPyWSGIServer((str(ip), int(port)), app)
-logging.info('Bazarr is started and waiting for request on http://' + str(ip) + ':' + str(port) + str(base_url))
try:
- print('Bazarr is started and waiting for request on http://' + str(ip) + ':' + str(port) + str(base_url))
+ logging.info('Bazarr is started and waiting for request on http://' + str(ip) + ':' + str(port) + str(base_url))
+ print 'Bazarr is started and waiting for request on http://' + str(ip) + ':' + str(port) + str(base_url)
+ sys.stdout.flush()
server.start()
except KeyboardInterrupt:
shutdown()