comparison MoinMoin/action/PackagePages.py @ 5806:f94598e95801

fix pep8 issue
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 02 Dec 2011 20:53:35 +0100
parents 89882824b375
children
comparison
equal deleted inserted replaced
5805:da0c45f012fb 5806:f94598e95801
199 cnt += 1 199 cnt += 1
200 files = _get_files(self.request, page.page_name) 200 files = _get_files(self.request, page.page_name)
201 script.append(packLine(["AddRevision", str(cnt), page.page_name, userid, "Created by the PackagePages action."])) 201 script.append(packLine(["AddRevision", str(cnt), page.page_name, userid, "Created by the PackagePages action."]))
202 202
203 timestamp = wikiutil.version2timestamp(page.mtime_usecs()) 203 timestamp = wikiutil.version2timestamp(page.mtime_usecs())
204 204
205 # avoid getting strange exceptions from zipfile in case of pre-1980 timestamps 205 # avoid getting strange exceptions from zipfile in case of pre-1980 timestamps
206 nineteeneighty = (10 * 365 + 3) * 24 * 3600 # 1970 + 10y + 3d 206 nineteeneighty = (10 * 365 + 3) * 24 * 3600 # 1970 + 10y + 3d
207 timestamp = max(nineteeneighty, timestamp) # zip can not store timestamps before 1980 207 timestamp = max(nineteeneighty, timestamp) # zip can not store timestamps before 1980
208 208
209 zi = zipfile.ZipInfo(filename=str(cnt), date_time=datetime.fromtimestamp(timestamp).timetuple()[:6]) 209 zi = zipfile.ZipInfo(filename=str(cnt), date_time=datetime.fromtimestamp(timestamp).timetuple()[:6])