diff --git a/mylar/search.py b/mylar/search.py index c56b62b0..cd4bd735 100755 --- a/mylar/search.py +++ b/mylar/search.py @@ -896,7 +896,8 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa comsize_b = entry['size'] elif entry['site'] == 'DDL': comsize_b = helpers.human2bytes(entry['size']) - except: + except Exception as e: + logger.warn('[ERROR] %s' % e) tmpsz = entry.enclosures[0] comsize_b = tmpsz['length'] @@ -1178,7 +1179,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa elif ComVersChk == 0: logger.fdebug("Series version detected as V1 (only series in existance with that title). Bypassing Year/Volume check") yearmatch = "true" - elif UseFuzzy == "0" or UseFuzzy == "2" or UseFuzzy is None or IssDateFix != "no": + elif any([UseFuzzy == "0", UseFuzzy == "2", UseFuzzy is None, IssDateFix != "no"]) and parsed_comic['issue_year'] is not None: if parsed_comic['issue_year'][:-2] == '19' or parsed_comic['issue_year'][:-2] == '20': logger.fdebug('year detected: %s' % parsed_comic['issue_year']) result_comyear = parsed_comic['issue_year'] diff --git a/mylar/webserve.py b/mylar/webserve.py index d7026950..032eee79 100644 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -4545,13 +4545,20 @@ class WebInterface(object): #---- # to be implemented in the future. if mylar.INSTALL_TYPE == 'git': - branch_history, err = mylar.versioncheck.runGit('log --pretty=format:"%h - %cr - %an - %s" -n 5') - #here we pass the branch_history to the pretty_git module to break it down - if branch_history: - br_hist = self.pretty_git(branch_history) - #br_hist = branch_history.replace("\n", "
\n") - else: - br_hist = err + try: + branch_history, err = mylar.versioncheck.runGit('log --encoding=UTF-8 --pretty=format:"%h - %cr - %an - %s" -n 5') + #here we pass the branch_history to the pretty_git module to break it down + if branch_history: + br_hist = self.pretty_git(branch_history) + try: + br_hist = u"" + br_hist.decode('utf-8') + except: + br_hist = br_hist + else: + br_hist = err + except Exception as e: + logger.fdebug('[ERROR] Unable to retrieve git revision history for some reason: %s' % e) + br_hist = 'This would be a nice place to see revision history...' else: br_hist = 'This would be a nice place to see revision history...' #----