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

Side by Side Diff: client/utils/zip_package.py

Issue 1860863002: Update copyright notice from Swarming to LUCI; add AUTHORS and CONTRIBUTORS. (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « client/utils/tools.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Swarming Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 that 2 # Use of this source code is governed by the Apache v2.0 license that can be
3 # can be found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Utilities to work with importable python zip packages.""" 5 """Utilities to work with importable python zip packages."""
6 6
7 import atexit 7 import atexit
8 import collections 8 import collections
9 import cStringIO as StringIO 9 import cStringIO as StringIO
10 import hashlib 10 import hashlib
11 import os 11 import os
12 import pkgutil 12 import pkgutil
13 import re 13 import re
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 h = hashlib.sha1() 336 h = hashlib.sha1()
337 with zipfile.ZipFile(get_main_script_path(), 'r') as z: 337 with zipfile.ZipFile(get_main_script_path(), 'r') as z:
338 for name in sorted(z.namelist()): 338 for name in sorted(z.namelist()):
339 with z.open(name) as f: 339 with z.open(name) as f:
340 h.update(str(len(name))) 340 h.update(str(len(name)))
341 h.update(name) 341 h.update(name)
342 content = f.read() 342 content = f.read()
343 h.update(str(len(content))) 343 h.update(str(len(content)))
344 h.update(content) 344 h.update(content)
345 return h.hexdigest() 345 return h.hexdigest()
OLDNEW
« no previous file with comments | « client/utils/tools.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698