aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Dartiguelongue <eva@gentoo.org>2018-05-14 17:40:05 +0200
committerGilles Dartiguelongue <eva@gentoo.org>2018-05-14 17:40:05 +0200
commit186940276c1c6f7eafd4c93368bc5ae28ef7ded7 (patch)
tree5fb3b2c4b5055fd9c626e9b631358c66fa23284f
parentUse yield rather than returning an iterator in generator function (diff)
downloadelogv-186940276c1c6f7eafd4c93368bc5ae28ef7ded7.tar.gz
elogv-186940276c1c6f7eafd4c93368bc5ae28ef7ded7.tar.bz2
elogv-186940276c1c6f7eafd4c93368bc5ae28ef7ded7.zip
Drop pre-python 2.5 compatibility code
-rwxr-xr-xelogv8
1 files changed, 1 insertions, 7 deletions
diff --git a/elogv b/elogv
index 049a1bf..38d709c 100755
--- a/elogv
+++ b/elogv
@@ -475,13 +475,7 @@ class ElogViewer:
if len(split_up) < 3:
continue
(cat, pn, other) = split_up[-3:]
- if sys.version_info[:2] >= (2, 5):
- date = datetime.strptime(other, "%Y%m%d-%H%M%S.log")
- else:
- # This is for backward compatibility with older version of python
- # it will be removed in the future
- date_str = other[:8]
- date = datetime(int(date_str[:4]),int(date_str[4:6]),int(date_str[6:]))
+ date = datetime.strptime(other, "%Y%m%d-%H%M%S.log")
self.packages.append( (filepath, cat, pn, date, self.get_class(filepath)) )
if not self.packages: