forked from len0rd/rockbox
gitscraper: support Python3.
Make gitscraper and tarball script work with both Python 2 and Python 3. Tested with 2.7 and 3.2. Change-Id: I31b2580660d764d013bca6fe59d5663ae9f7f5aa
This commit is contained in:
parent
0ca7b83595
commit
885db72b8b
2 changed files with 23 additions and 23 deletions
|
@ -5,7 +5,7 @@ import os
|
|||
import sys
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print "Usage: %s <version|hash>" % sys.argv[0]
|
||||
print("Usage: %s <version|hash>" % sys.argv[0])
|
||||
sys.exit()
|
||||
|
||||
repository = os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")
|
||||
|
@ -17,7 +17,7 @@ if '.' in sys.argv[1]:
|
|||
if ref in refs:
|
||||
tree = refs[ref]
|
||||
else:
|
||||
print "Could not find hash for version!"
|
||||
print("Could not find hash for version!")
|
||||
sys.exit()
|
||||
else:
|
||||
tree = sys.argv[1]
|
||||
|
@ -25,6 +25,6 @@ else:
|
|||
|
||||
gitscraper.archive_files(repository, tree, [], basename, archive="7z")
|
||||
|
||||
print "done."
|
||||
print("done.")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue