diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-06-08 23:56:33 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-06-09 16:54:59 +0200 |
commit | 6b3c4beba4135681f0484d41ac096e1599939bd4 (patch) | |
tree | 274beced5c3fb3d59d8a935fb12b887a1ee35cac /utils/common/gitscraper.py | |
parent | 43d8d6fece984b5ee3d4121a8982ac4919225d68 (diff) | |
download | rockbox-6b3c4beba4135681f0484d41ac096e1599939bd4.tar.gz rockbox-6b3c4beba4135681f0484d41ac096e1599939bd4.zip |
Rework langstat.
- Generally improve code and make it compliant to PEP8.
- Make it work with Python3 as well.
Change-Id: I9e99999c59dc501664c36dd38fcb85fb60d6d9e6
Diffstat (limited to 'utils/common/gitscraper.py')
-rwxr-xr-x | utils/common/gitscraper.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/common/gitscraper.py b/utils/common/gitscraper.py index 9660acb83a..86d6a980cd 100755 --- a/utils/common/gitscraper.py +++ b/utils/common/gitscraper.py | |||
@@ -95,7 +95,7 @@ def get_lstree(repo, start, filterlist=[]): | |||
95 | if rf[3] in objects: | 95 | if rf[3] in objects: |
96 | print("FATAL: key already exists in dict!") | 96 | print("FATAL: key already exists in dict!") |
97 | return {} | 97 | return {} |
98 | objects[rf[3]] = rf[2] | 98 | objects[rf[3].decode()] = rf[2].decode() |
99 | return objects | 99 | return objects |
100 | 100 | ||
101 | 101 | ||
@@ -172,7 +172,7 @@ def scrape_files(repo, treehash, filelist, dest="", timestamp_files=[]): | |||
172 | treeobjects = get_lstree(repo, treehash, filelist) | 172 | treeobjects = get_lstree(repo, treehash, filelist) |
173 | timestamps = {} | 173 | timestamps = {} |
174 | for obj in treeobjects: | 174 | for obj in treeobjects: |
175 | get_object(repo, treeobjects[obj], os.path.join(dest.encode(), obj)) | 175 | get_object(repo, treeobjects[obj], os.path.join(dest, obj)) |
176 | for f in timestamp_files: | 176 | for f in timestamp_files: |
177 | if obj.find(f) == 0: | 177 | if obj.find(f) == 0: |
178 | timestamps[obj] = get_file_timestamp(repo, treehash, obj) | 178 | timestamps[obj] = get_file_timestamp(repo, treehash, obj) |