removed python2.7.9 reference on configuration page, fixed nzbget binary error, added configuration location to logging initialization, fix some unicode errors

This commit is contained in:
evilhero 2020-01-13 16:33:15 -05:00
parent 5e2855cb51
commit 05652beef1
5 changed files with 9 additions and 11 deletions

View File

@ -828,9 +828,6 @@
-->
<div class="row checkbox left clearfix">
<input type="checkbox" id="enable_32p" onclick="initConfigCheckbox($(this));" name="enable_32p" value=1 ${config['enable_32p']} /><label>Enable 32P</label>
<div align="left">
<small class="heading"><span style="float: left; margin-left: .3em; margin-top: 4px;" class="ui-icon ui-icon-info"></span>python 2.7.9 required for 32P usage</small>
</div>
</div>
<div class="config">
<fieldset>

View File

@ -1770,8 +1770,8 @@ def setperms(path, dir=False):
logger.fdebug('Successfully changed permissions [' + str(mylar.CONFIG.CHMOD_DIR) + ' / ' + str(mylar.CONFIG.CHMOD_FILE) + ']')
except OSError:
logger.error('Could not change permissions : %s. Exiting...' % path)
except OSError as e:
logger.error('[ERROR @ path: %s] %s. Exiting...' % (path, e))
return

View File

@ -78,7 +78,7 @@ def pullsearch(comicapi, comicquery, offset, type):
try:
dom = parseString(r.content) #(data)
except ExpatError:
if '<title>Abnormal Traffic Detected' in r.content:
if 'Abnormal Traffic Detected' in r.content.decode('utf-8'):
logger.error('ComicVine has banned this server\'s IP address because it exceeded the API rate limit.')
else:
logger.warn('[WARNING] ComicVine is not responding correctly at the moment. This is usually due to some problems on their end. If you re-try things again in a few moments, it might work properly.')

View File

@ -66,9 +66,11 @@ class NZBGet(object):
nzbgetpriority = 0
in_file = open(filename, 'r')
nzbcontent = in_file.read()
in_file.close()
with open(filename, 'rb') as in_file:
while True:
nzbcontent = in_file.read(4096)
if not chunk:
break
nzbcontent64 = standard_b64encode(nzbcontent)
try:
logger.fdebug('sending now to %s' % self.nzb_url)

View File

@ -1,5 +1,4 @@
# This file is part of Mylar.
# -*- coding: utf-8 -*-
#
# Mylar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -4018,7 +4017,7 @@ class WebInterface(object):
logger.debug("If you can read this message, debug logging is now working")
else:
logger.info("normal (INFO) logging is now enabled")
logger.info('config file has been loaded from: %s' % mylar.CONFIG_FILE)
raise cherrypy.HTTPRedirect("logs")
toggleVerbose.exposed = True