Commit 4127ed3a authored by echel0n's avatar echel0n

Refactored misc errors to warnings.

parent 83909dd6
......@@ -229,6 +229,7 @@ module.exports = function (grunt) {
grunt.log.writeln(('Packaging Pre-Release v' + newVersion).magenta);
const tasks = [
'changelog',
'webpack:dev',
'sync_trans', // sync translations with crowdin
'exec:git_commit:Pre-Release v' + newVersion,
......@@ -265,8 +266,9 @@ module.exports = function (grunt) {
grunt.log.writeln(('Packaging Release v' + newVersion).magenta);
const tasks = [
'changelog',
'webpack:prod',
//'sync_trans', // sync translations with crowdin
'sync_trans', // sync translations with crowdin
'exec:git_commit:Release v' + newVersion,
'exec:git_flow_release_start:' + newVersion,
'exec:git_flow_release_finish:' + newVersion + ':Release v' + newVersion,
......
# Changelog
- * 0ff8c3f - 2018-11-10: Release v9.4.26
- * af1611e - 2018-11-10: Refactored misc errors to warnings.
- * 78c64b1 - 2018-11-10: Release v9.4.26
- * 9e4dc5f - 2018-11-10: Fixed issue with file browser and clicking on files not properly choosing file and closing browser dialog.
- * 0972ec5 - 2018-11-10: Removed restoring of application ID from backup/restore functions
- * 9cf70c3 - 2018-11-10: Release v9.4.25
......
......@@ -316,8 +316,7 @@ def main():
# start app
app.start()
except (SystemExit, KeyboardInterrupt):
if app:
app.shutdown()
if app: app.shutdown()
except ImportError:
traceback.print_exc()
if os.path.isfile(REQS_FILE):
......
......@@ -136,7 +136,7 @@ def codeDescription(status_code):
if status_code in http_error_code:
return http_error_code[status_code]
else:
sickrage.app.log.error("Unknown error code: %s. Please submit an issue" % status_code)
sickrage.app.log.warning("Unknown error code: %s. Please submit an issue" % status_code)
return 'unknown'
......
......@@ -2423,7 +2423,7 @@ class ConfigMigrator(Config):
"""
if current_version > expected_version:
sickrage.app.log.error("Your config version (%i) has been incremented past what this version of supports "
sickrage.app.log.warning("Your config version (%i) has been incremented past what this version of supports "
"(%i). If you have used other forks or a newer version of your config file may be "
"unusable due to their modifications." % (current_version,
expected_version)
......
......@@ -56,7 +56,7 @@ def getSeasonNZBs(name, urlData, season):
if sceneNameMatch:
showName, qualitySection, groupName = sceneNameMatch.groups()
else:
sickrage.app.log.error("Unable to parse " + name + " into a scene name. If it's a valid one log a bug.")
sickrage.app.log.error("Unable to parse " + name + " into a scene name. If it's a valid, log a bug.")
return {}, ''
regex = '(' + re.escape(showName) + '\.S%02d(?:[E0-9]+)\.[\w\._]+\-\w+' % season + ')'
......@@ -107,7 +107,7 @@ def saveNZB(nzbName, nzbString):
nzb_fh.write(nzbString)
except EnvironmentError as e:
sickrage.app.log.error("Unable to save NZB: {}".format(e))
sickrage.app.log.warning("Unable to save NZB: {}".format(e))
def stripNS(element, ns):
......
......@@ -73,8 +73,7 @@ def snatchEpisode(result, endStatus=SNATCHED):
is_proper = True if endStatus == SNATCHED_PROPER else False
dlResult = NZBGet.sendNZB(result, is_proper)
else:
sickrage.app.log.error(
"Unknown NZB action specified in config: " + sickrage.app.config.nzb_method)
sickrage.app.log.error("Unknown NZB action specified in config: " + sickrage.app.config.nzb_method)
elif result.resultType in ("torrent", "torznab"):
# add public trackers to torrent result
if not result.provider.private:
......@@ -381,8 +380,7 @@ def searchProviders(show, episodes, manualSearch=False, downCurQuality=False, up
sickrage.app.log.warning("Authentication error: {}".format(e))
break
except Exception as e:
sickrage.app.log.error(
"Error while searching " + providerObj.name + ", skipping: {}".format(e))
sickrage.app.log.error("Error while searching " + providerObj.name + ", skipping: {}".format(e))
break
finally:
threading.currentThread().setName(origThreadName)
......
......@@ -526,7 +526,7 @@ class TVEpisode(object):
# early conversion to int so that episode doesn't get marked dirty
self.indexerid = try_int(safe_getattr(myEp, 'id'), self.indexerid)
if self.indexerid is None:
sickrage.app.log.error("Failed to retrieve ID from " + IndexerApi(self.indexer).name)
sickrage.app.log.warning("Failed to retrieve ID from " + IndexerApi(self.indexer).name)
if self.indexerid != -1:
self.deleteEpisode()
return False
......@@ -606,7 +606,7 @@ class TVEpisode(object):
try:
os.rename(nfoFile, nfoFile + ".old")
except Exception as e:
sickrage.app.log.error(
sickrage.app.log.warning(
"Failed to rename your episode's NFO file - you need to delete it or fix it: {}".format(e))
raise NoNFOException("Error in NFO format")
......@@ -902,14 +902,14 @@ class TVEpisode(object):
cur_result = self.rename_ep_file(cur_related_file, proper_related_path,
absolute_current_path_no_ext_length + len(subfolder))
if not cur_result:
sickrage.app.log.error(str(self.indexerid) + ": Unable to rename file " + cur_related_file)
sickrage.app.log.warning(str(self.indexerid) + ": Unable to rename file " + cur_related_file)
for cur_related_sub in related_subs:
absolute_proper_subs_path = os.path.join(sickrage.app.config.subtitles_dir, self.formatted_filename())
cur_result = self.rename_ep_file(cur_related_sub, absolute_proper_subs_path,
absolute_current_path_no_ext_length)
if not cur_result:
sickrage.app.log.error(str(self.indexerid) + ": Unable to rename file " + cur_related_sub)
sickrage.app.log.warning(str(self.indexerid) + ": Unable to rename file " + cur_related_sub)
# save the ep
with self.lock:
......@@ -1392,7 +1392,7 @@ class TVEpisode(object):
sickrage.app.log.info("Renaming file from %s to %s" % (cur_path, new_path))
moveFile(cur_path, new_path)
except (OSError, IOError) as e:
sickrage.app.log.error("Failed renaming %s to %s : %r" % (cur_path, new_path, e))
sickrage.app.log.warning("Failed renaming %s to %s : %r" % (cur_path, new_path, e))
return False
# clean up any old folders that are empty
......
......@@ -818,8 +818,7 @@ class TVShow(object):
try:
curEp = self.getEpisode(season, episode, filename)
except EpisodeNotFoundException:
sickrage.app.log.error(
str(self.indexerid) + ": Unable to figure out what this file is, skipping")
sickrage.app.log.error("{}: Unable to figure out what this file is, skipping".format(self.indexerid))
continue
else:
......@@ -1212,9 +1211,8 @@ class TVShow(object):
episode.downloadSubtitles()
except Exception:
sickrage.app.log.debug(
sickrage.app.log.error(
"%s: Error occurred when downloading subtitles for %s" % (self.indexerid, self.name))
sickrage.app.log.error(traceback.format_exc())
def saveToDB(self, force_save=False):
if not self.dirty and not force_save:
......
......@@ -404,8 +404,7 @@ class ApiCall(ApiHandler):
elif arg_type == "ignore":
pass
else:
sickrage.app.log.error(
'Invalid param type: "{}" can not be checked. Ignoring it.'.format(str(arg_type)))
sickrage.app.log.error('Invalid param type: "{}" can not be checked. Ignoring it.'.format(str(arg_type)))
if error:
# this is a real ApiError !!
......
......@@ -383,7 +383,7 @@ class GenericMetadata(object):
chmodAsParent(nfo_file_path)
except IOError as e:
sickrage.app.log.error(
sickrage.app.log.warning(
"Unable to write file to " + nfo_file_path + " - are you sure the folder is writable? {}".format(e))
return False
......@@ -427,7 +427,7 @@ class GenericMetadata(object):
chmodAsParent(nfo_file_path)
except IOError as e:
sickrage.app.log.error(
sickrage.app.log.warning(
"Unable to write file to " + nfo_file_path + " - are you sure the folder is writable? {}".format(e))
return False
......@@ -610,7 +610,7 @@ class GenericMetadata(object):
chmodAsParent(image_path)
except IOError as e:
sickrage.app.log.error(
sickrage.app.log.warning(
"Unable to write image to " + image_path + " - are you sure the show folder is writable? {}".format(e))
return False
......@@ -650,7 +650,7 @@ class GenericMetadata(object):
return None
if image_type not in ('fanart', 'poster', 'series', 'poster_thumb', 'series_thumb'):
sickrage.app.log.error(
sickrage.app.log.warning(
"Invalid image type " + str(image_type) + ", couldn't find it in the " + IndexerApi(
show_obj.indexer).name + " object")
return
......
......@@ -48,7 +48,7 @@ class IPTorrentsProvider(TorrentProvider):
self.custom_url = ""
self.cache = TVCache(self)
self.cache = TVCache(self, min_time=10)
def login(self):
return self.cookie_login('sign in')
......@@ -117,9 +117,13 @@ class IPTorrentsProvider(TorrentProvider):
seeders = int(torrent.find('td', attrs={'class': 'ac t_seeders'}).text)
leechers = int(torrent.find('td', attrs={'class': 'ac t_leechers'}).text)
results += [
{'title': title, 'link': download_url, 'size': size, 'seeders': seeders, 'leechers': leechers}
]
results += [{
'title': title,
'link': download_url,
'size': size,
'seeders': seeders,
'leechers': leechers
}]
if mode != 'RSS':
sickrage.app.log.debug("Found result: {}".format(title))
......
......@@ -227,7 +227,7 @@ def get_subtitles_path(video_path):
new_subtitles_path = os.path.join(os.path.dirname(video_path), sickrage.app.config.subtitles_dir)
dir_exists = makeDir(new_subtitles_path)
if not dir_exists:
sickrage.app.log.error('Unable to create subtitles folder {}'.format(new_subtitles_path))
sickrage.app.log.warning('Unable to create subtitles folder {}'.format(new_subtitles_path))
else:
chmodAsParent(new_subtitles_path)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment