From 81a802948035e33d28bc9039b03865b5578c3980 Mon Sep 17 00:00:00 2001 From: evilhero Date: Mon, 9 Jun 2014 15:49:55 -0400 Subject: [PATCH] FIX: count error on invalid issnum (will address later) --- mylar/helpers.py | 16 ++++++++-------- mylar/webserve.py | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/mylar/helpers.py b/mylar/helpers.py index 6f33e015..fc421e57 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -717,14 +717,14 @@ def issuedigits(issnum): if str(issnum).isdigit(): int_issnum = int( issnum ) * 1000 else: - count = 0 - for char in issnum: - if char.isalpha(): - count += 1 - if count > 5: - logger.error('This is not an issue number - not enough numerics to parse') - int_issnum = 999999999999999 - return int_issnum + #count = 0 + #for char in issnum: + # if char.isalpha(): + # count += 1 + #if count > 5: + # logger.error('This is not an issue number - not enough numerics to parse') + # int_issnum = 999999999999999 + # return int_issnum if 'au' in issnum.lower() and issnum[:1].isdigit(): int_issnum = (int(issnum[:-2]) * 1000) + ord('a') + ord('u') elif 'ai' in issnum.lower() and issnum[:1].isdigit(): diff --git a/mylar/webserve.py b/mylar/webserve.py index c2933bba..66b15cd4 100755 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -454,6 +454,7 @@ class WebInterface(object): logger.fdebug("Deleted nzblog table.") myDB.action('CREATE TABLE IF NOT EXISTS nzblog (IssueID TEXT, NZBName TEXT, SARC TEXT)') logger.fdebug("Re-created nzblog table.") + raise cherrypy.HTTPRedirect("history") wipenzblog.exposed = True def refreshArtist(self, ComicID):