Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: bootstrap/get_appengine.py

Issue 489703003: get_appengine.py: fix for go_appengine (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bootstrap/get_appengine.py
diff --git a/bootstrap/get_appengine.py b/bootstrap/get_appengine.py
index bee63ce67072cbc5bc1c28689e993fb3592c387e..0d9f1c90b9f625aa5e515e08667b4afb11e22cbe 100755
--- a/bootstrap/get_appengine.py
+++ b/bootstrap/get_appengine.py
@@ -3,12 +3,14 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import datetime
import logging
import optparse
import os
import re
import shutil
import sys
+import time
import tempfile
import urllib2
import zipfile
@@ -48,13 +50,16 @@ def extract_zip(z, root_path):
count = 0
for f in z.infolist():
perm = (f.external_attr >> 16L) & 0777
+ mtime = time.mktime(datetime.datetime(*f.date_time).timetuple())
filepath = os.path.join(root_path, f.filename)
logging.debug('Extracting %s', f.filename)
if f.filename.endswith('/'):
os.mkdir(filepath, perm)
+ os.utime(filepath, (mtime, mtime))
Paweł Hajdan Jr. 2014/08/21 10:23:05 Since this is the same for both branches, why not
ukai 2014/08/21 14:12:18 Done.
else:
z.extract(f, root_path)
os.chmod(filepath, perm)
+ os.utime(filepath, (mtime, mtime))
count += 1
print('Extracted %d files' % count)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698