Commit 0c10ea7a authored by Philip Thiem's avatar Philip Thiem

minor cleanups

--HG--
branch : distribute
extra : rebase_source : a872a0ee0700a60994fea3417193998d9e9456a3
parent 4350a091
...@@ -1349,6 +1349,7 @@ class EmptyProvider(NullProvider): ...@@ -1349,6 +1349,7 @@ class EmptyProvider(NullProvider):
empty_provider = EmptyProvider() empty_provider = EmptyProvider()
def build_zipmanifest(path): def build_zipmanifest(path):
""" """
This builds a similar dictionary to the zipimport directory This builds a similar dictionary to the zipimport directory
...@@ -1363,9 +1364,9 @@ def build_zipmanifest(path): ...@@ -1363,9 +1364,9 @@ def build_zipmanifest(path):
* [3] - zipinfo.file_size * [3] - zipinfo.file_size
* [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800
len(ascii encoding of filename) otherwise len(ascii encoding of filename) otherwise
* [5] - (zipinfo.date_time[0] - 1980) << 9 | * [5] - (zipinfo.date_time[0] - 1980) << 9 |
zipinfo.date_time[1] << 5 | zipinfo.date_time[2] zipinfo.date_time[1] << 5 | zipinfo.date_time[2]
* [6] - (zipinfo.date_time[3] - 1980) << 11 | * [6] - (zipinfo.date_time[3] - 1980) << 11 |
zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2)
* [7] - zipinfo.CRC * [7] - zipinfo.CRC
""" """
...@@ -1422,7 +1423,7 @@ class ZipProvider(EggProvider): ...@@ -1422,7 +1423,7 @@ class ZipProvider(EggProvider):
@staticmethod @staticmethod
def _get_date_and_size(zip_stat): def _get_date_and_size(zip_stat):
size = zip_stat.file_size size = zip_stat.file_size
date_time = zip_stat.date_time + (0, 0, -1) #ymdhms+wday, yday, dst date_time = zip_stat.date_time + (0, 0, -1) # ymdhms+wday, yday, dst
#1980 offset already done #1980 offset already done
timestamp = time.mktime(date_time) timestamp = time.mktime(date_time)
return timestamp, size return timestamp, size
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment