multiarchive 0.2.4__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {multiarchive-0.2.4 → multiarchive-0.2.5}/PKG-INFO +1 -1
- {multiarchive-0.2.4 → multiarchive-0.2.5}/pyproject.toml +1 -1
- {multiarchive-0.2.4 → multiarchive-0.2.5}/pyproject.toml.orig +1 -1
- {multiarchive-0.2.4 → multiarchive-0.2.5}/src/multiarchive/_archive.py +8 -2
- {multiarchive-0.2.4 → multiarchive-0.2.5}/README.md +0 -0
- {multiarchive-0.2.4 → multiarchive-0.2.5}/src/multiarchive/__init__.py +0 -0
|
@@ -141,7 +141,10 @@ class ArchiveMemberInfo:
|
|
|
141
141
|
|
|
142
142
|
@classmethod
|
|
143
143
|
def from_zipinfo(cls, info: zipfile.ZipInfo) -> "ArchiveMemberInfo":
|
|
144
|
-
|
|
144
|
+
try:
|
|
145
|
+
mtime_dt = datetime(*info.date_time)
|
|
146
|
+
except ValueError:
|
|
147
|
+
mtime_dt = datetime(1980, 1, 1)
|
|
145
148
|
return cls(
|
|
146
149
|
name=info.filename,
|
|
147
150
|
uncompressed_size=info.file_size,
|
|
@@ -194,7 +197,10 @@ class ArchiveMemberInfo:
|
|
|
194
197
|
if info.mtime is not None:
|
|
195
198
|
mtime = info.mtime.timestamp()
|
|
196
199
|
elif info.date_time is not None:
|
|
197
|
-
|
|
200
|
+
try:
|
|
201
|
+
mtime = datetime(*info.date_time).timestamp()
|
|
202
|
+
except ValueError:
|
|
203
|
+
mtime = 0.0
|
|
198
204
|
else:
|
|
199
205
|
mtime = 0.0
|
|
200
206
|
assert info.filename is not None
|
|
File without changes
|
|
File without changes
|