stuff found on "Porting to Python 3.3"

This commit is contained in:
Thomas Waldmann 2015-12-15 01:08:35 +01:00
parent 8e13d315bb
commit 0be62d4233
2 changed files with 2 additions and 2 deletions

View File

@ -438,7 +438,7 @@ class Archiver:
pass
try:
mtime = datetime.fromtimestamp(bigint_to_int(item[b'mtime']) / 1e9)
except ValueError:
except OverflowError:
# likely a broken mtime and datetime did not want to go beyond year 9999
mtime = datetime(9999, 12, 31, 23, 59, 59)
if b'source' in item:

View File

@ -211,7 +211,7 @@ if not on_rtd:
Extension('borg.chunker', [chunker_source]),
Extension('borg.hashindex', [hashindex_source])
]
if sys.platform.startswith('linux'):
if sys.platform == 'linux':
ext_modules.append(Extension('borg.platform_linux', [platform_linux_source], libraries=['acl']))
elif sys.platform.startswith('freebsd'):
ext_modules.append(Extension('borg.platform_freebsd', [platform_freebsd_source]))