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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: multiarchive
3
- Version: 0.2.4
3
+ Version: 0.2.5
4
4
  Summary: A high level archive handler for Python.
5
5
  Author: NSPC911
6
6
  Author-email: NSPC911 <87571998+NSPC911@users.noreply.github.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "multiarchive"
3
- version = "0.2.4"
3
+ version = "0.2.5"
4
4
  description = "A high level archive handler for Python."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "multiarchive"
3
- version = "0.2.4"
3
+ version = "0.2.5"
4
4
  description = "A high level archive handler for Python."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -141,7 +141,10 @@ class ArchiveMemberInfo:
141
141
 
142
142
  @classmethod
143
143
  def from_zipinfo(cls, info: zipfile.ZipInfo) -> "ArchiveMemberInfo":
144
- mtime_dt = datetime(*info.date_time)
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
- mtime = datetime(*info.date_time).timestamp()
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