Merge lp:~dooferlad/linaro-license-protection/bigdir into lp:~linaro-automation/linaro-license-protection/trunk

Proposed by James Tunnicliffe
Status: Merged
Approved by: Milo Casagrande
Approved revision: 194
Merged at revision: 194
Proposed branch: lp:~dooferlad/linaro-license-protection/bigdir
Merge into: lp:~linaro-automation/linaro-license-protection/trunk
Diff against target: 42 lines (+16/-3)
2 files modified
HACKING (+2/-0)
license_protected_downloads/buildinfo.py (+14/-3)
To merge this branch: bzr merge lp:~dooferlad/linaro-license-protection/bigdir
Reviewer Review Type Date Requested Status
Milo Casagrande (community) Approve
Review via email: mp+166254@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Milo Casagrande (milo) wrote :

Looks great!
Thanks for working on this!
+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'HACKING'
--- HACKING 2013-03-12 14:59:02 +0000
+++ HACKING 2013-05-29 13:42:29 +0000
@@ -10,6 +10,8 @@
10 * python-mock10 * python-mock
11 * python-subunit11 * python-subunit
12 * testrepository (>=0.0.6)12 * testrepository (>=0.0.6)
13 * python-django-openid-auth
14 * python-textile
1315
14Code structure16Code structure
15--------------17--------------
1618
=== modified file 'license_protected_downloads/buildinfo.py'
--- license_protected_downloads/buildinfo.py 2013-05-08 12:10:58 +0000
+++ license_protected_downloads/buildinfo.py 2013-05-29 13:42:29 +0000
@@ -57,11 +57,22 @@
5757
58 def getInfoForFile(self):58 def getInfoForFile(self):
59 for block in self.build_info_array:59 for block in self.build_info_array:
60
61 if self.fname in block:
62 # File name matches a key directly - don't need to iterate
63 # through each using fnmatch to implement globs.
64 return block[self.fname]
65
66 if self.full_file_name == self.search_path:
67 # Searching for directory match. This will only match the "*"
68 # glob.
69 if "*" in block:
70 return block["*"]
71 else:
72 return [{}]
73
60 for key in block:74 for key in block:
61 if key != "format-version":75 if key != "format-version":
62 # Special handling of entire-directory access specifier
63 if key == "*" and os.path.isdir(self.full_file_name):
64 return block[key]
65 if fnmatch.fnmatch(self.full_file_name,76 if fnmatch.fnmatch(self.full_file_name,
66 os.path.join(self.search_path, key)):77 os.path.join(self.search_path, key)):
67 return block[key]78 return block[key]

Subscribers

People subscribed via source and target branches