Replace sys.stderr with logger

This commit is contained in:
JonnyWong16 2020-07-27 18:47:08 -07:00
parent 570ebb4f73
commit bbb6e46515
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 2 additions and 3 deletions

View file

@ -131,8 +131,7 @@ def main():
if args.daemon:
if sys.platform == 'win32':
sys.stderr.write(
"Daemonizing not supported under Windows, starting normally\n")
logger.warn("Daemonizing not supported under Windows, starting normally")
else:
plexpy.DAEMON = True
plexpy.QUIET = True

View file

@ -264,7 +264,7 @@ def initialize(options):
cherrypy.engine.start()
cherrypy.engine.block()
except IOError:
sys.stderr.write('Failed to start on port: %i. Is something else running?\n' % (options['http_port']))
logger.error("Tautulli WebStart :: Failed to start on port: %i. Is something else running?" % options['http_port'])
sys.exit(1)
cherrypy.server.wait()