Mercurial > ~astiob > upreckon > hgweb
annotate 2.00/zipfile.py @ 31:fe1463e7e24d
Clean up try-except clauses
More try-except-else goodness (with the stress on else).
Bug fix: compat.py now creates zip_longest in Python 2.5 instead of raising an exception.
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Thu, 25 Nov 2010 00:03:29 +0000 |
parents | a8cc383b787c |
children |
rev | line source |
---|---|
21 | 1 import sys |
29
a8cc383b787c
Clean up zipfiles and diff them to stock ones
Oleg Oshmyan <chortos@inbox.lv>
parents:
21
diff
changeset
|
2 if sys.version_info[0] >= 3: |
a8cc383b787c
Clean up zipfiles and diff them to stock ones
Oleg Oshmyan <chortos@inbox.lv>
parents:
21
diff
changeset
|
3 from zipfile31 import * |
a8cc383b787c
Clean up zipfiles and diff them to stock ones
Oleg Oshmyan <chortos@inbox.lv>
parents:
21
diff
changeset
|
4 elif sys.version_info[1] >= 7: |
a8cc383b787c
Clean up zipfiles and diff them to stock ones
Oleg Oshmyan <chortos@inbox.lv>
parents:
21
diff
changeset
|
5 from zipfile27 import * |
21 | 6 else: |
29
a8cc383b787c
Clean up zipfiles and diff them to stock ones
Oleg Oshmyan <chortos@inbox.lv>
parents:
21
diff
changeset
|
7 from zipfile26 import * |