summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-02-21 10:39:35 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-02-21 10:39:35 (GMT)
commit2d0589be6739e15bc27ab8996ee0727a5a3dda51 (patch)
treeb8eb728af7ddbcd35c7ff9ca9d35894d39c5c07c /Lib
parent0009c4ea590b5bb4c00c33bc96dca47a42e720f1 (diff)
downloadcpython-2d0589be6739e15bc27ab8996ee0727a5a3dda51.zip
cpython-2d0589be6739e15bc27ab8996ee0727a5a3dda51.tar.gz
cpython-2d0589be6739e15bc27ab8996ee0727a5a3dda51.tar.bz2
The code to write timestamps couldn't handle negative times (and time
on the Mac is negativevalues > 0x80000000). Fixed.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/gzip.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 8e34ed2..6cb90ac6 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -19,6 +19,8 @@ def write32(output, value):
output.write(struct.pack("<l", value))
def write32u(output, value):
+ if value < 0:
+ value = value + 0x100000000L
output.write(struct.pack("<L", value))
def read32(input):