Fix for 'BrokenPipeError' is not defined under Python 2.7.x.

This commit is contained in:
Louis Vézina 2019-12-07 12:53:40 -05:00
parent 1eb174d9ef
commit 4f996e4f2e
1 changed files with 3 additions and 1 deletions

View File

@ -2251,7 +2251,9 @@ def api_help():
# Mute DeprecationWarning
warnings.simplefilter("ignore", (DeprecationWarning, BrokenPipeError))
warnings.simplefilter("ignore", DeprecationWarning)
if six.PY3:
warnings.simplefilter("ignore", BrokenPipeError)
server = CherryPyWSGIServer((str(settings.general.ip), (int(args.port) if args.port else int(settings.general.port))), app)
try:
logging.info('BAZARR is started and waiting for request on http://' + str(settings.general.ip) + ':' + (str(