diff --git a/src/calibre/gui2/custom_column_widgets.py b/src/calibre/gui2/custom_column_widgets.py index 89adf7abc8..0becf4b0b3 100644 --- a/src/calibre/gui2/custom_column_widgets.py +++ b/src/calibre/gui2/custom_column_widgets.py @@ -375,14 +375,10 @@ class BulkText(BulkBase): ans = original_value vals = [v.strip() for v in unicode(self.adding_widget.text()).split(',')] for t in vals: - print 'adding', t if t not in ans: ans.append(t) - print ans vals = [v.strip() for v in unicode(self.removing_widget.text()).split(',')] - print 'removing', vals for t in vals: - print 'deleting', t if t in ans: ans.remove(t) return ans diff --git a/src/calibre/utils/date.py b/src/calibre/utils/date.py index e48e10d90f..cb1b1fe1ad 100644 --- a/src/calibre/utils/date.py +++ b/src/calibre/utils/date.py @@ -25,7 +25,13 @@ class SafeLocalTimeZone(tzlocal): return False def compute_locale_info_for_parse_date(): - dt = datetime.strptime('1/5/2000', "%x") + try: + dt = datetime.strptime('1/5/2000', "%x") + except ValueError: + try: + dt = datetime.strptime('1/5/01', '%x') + except: + return False if dt.month == 5: return True return False