diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-06-01 20:01:13 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-06-01 20:04:57 +0200 |
commit | ae6eba81baec4ce55acb7024a6f7d9db6922d5f1 (patch) | |
tree | 48e0cb454d6071baa6aca9dd81621bf5cb1b5ab1 /debian/patches | |
parent | 80b984bbe149b9875538eb95228bb8608ffb0803 (diff) |
New patch 0004-Normalise-year-info-to-be-within-Python-s-year-bound.patch
Normalise year info to be within Python's year bounds.
Thanks: Dave Holland
Closes: #574133
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/0004-Normalise-year-info-to-be-within-Python-s-year-bound.patch | 26 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/0004-Normalise-year-info-to-be-within-Python-s-year-bound.patch b/debian/patches/0004-Normalise-year-info-to-be-within-Python-s-year-bound.patch new file mode 100644 index 0000000..4cfccac --- /dev/null +++ b/debian/patches/0004-Normalise-year-info-to-be-within-Python-s-year-bound.patch @@ -0,0 +1,26 @@ +From: Dave Holland <dave@debian.org> +Date: Wed, 1 Jun 2011 19:58:27 +0200 +Subject: Normalise year info to be within Python's year bounds. + +Closes: #574133 +--- + vobject/icalendar.py | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/vobject/icalendar.py b/vobject/icalendar.py +index b960deb..79ea7af 100644 +--- a/vobject/icalendar.py ++++ b/vobject/icalendar.py +@@ -1617,6 +1617,11 @@ def stringToDateTime(s, tzinfo=None): + tzinfo = utc + except: + raise ParseError("'%s' is not a valid DATE-TIME" % s) ++ if year < datetime.MINYEAR: ++ year = datetime.MINYEAR ++ if year > datetime.MAXYEAR: ++ year = datetime.MAXYEAR ++ + return datetime.datetime(year, month, day, hour, minute, second, 0, tzinfo) + + +-- diff --git a/debian/patches/series b/debian/patches/series index d0a5236..5eeb1d1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0001-don-t-install-ics_diff.patch 0002-Deepcopy-params.patch 0003-Treat-untils-as-floating.patch +0004-Normalise-year-info-to-be-within-Python-s-year-bound.patch |