From 25b63dfc65330cdb5d06e79837a2a4ea203757ee Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Mon, 28 Jan 2013 17:38:59 +0000 Subject: [PATCH] Also check for unicode when converting to int value for output git-svn-id: http://comictagger.googlecode.com/svn/trunk@360 6c5673fe-1810-88d6-992b-cd32ca31540c --- comicbookinfo.py | 2 +- taggerwindow.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/comicbookinfo.py b/comicbookinfo.py index d61cb28..469a9d7 100644 --- a/comicbookinfo.py +++ b/comicbookinfo.py @@ -115,7 +115,7 @@ class ComicBookInfo: #helper func def toInt(s): i = None - if type(s) == str or type(s) == int: + if type(s) in [ str, unicode, int ]: try: i = int(s) except ValueError: diff --git a/taggerwindow.py b/taggerwindow.py index 55f0384..9286d8b 100644 --- a/taggerwindow.py +++ b/taggerwindow.py @@ -1573,8 +1573,7 @@ class TaggerWindow( QtGui.QMainWindow): if cv_md is None: match_results.fetchDataFailures.append(ca.path) - if cv_md is not None: - + if cv_md is not None: md.overlay( cv_md ) if not ca.writeMetadata( md, self.save_data_style ):