diff options
author | 2018-05-14 17:40:05 +0200 | |
---|---|---|
committer | 2018-05-14 17:40:05 +0200 | |
commit | 186940276c1c6f7eafd4c93368bc5ae28ef7ded7 (patch) | |
tree | 5fb3b2c4b5055fd9c626e9b631358c66fa23284f | |
parent | Use yield rather than returning an iterator in generator function (diff) | |
download | elogv-186940276c1c6f7eafd4c93368bc5ae28ef7ded7.tar.gz elogv-186940276c1c6f7eafd4c93368bc5ae28ef7ded7.tar.bz2 elogv-186940276c1c6f7eafd4c93368bc5ae28ef7ded7.zip |
Drop pre-python 2.5 compatibility code
-rwxr-xr-x | elogv | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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: |