Merge lp:~stevanr/linaro-license-protection/fix-build-info-splicing into lp:~linaro-automation/linaro-license-protection/trunk

Proposed by Stevan Radaković
Status: Merged
Approved by: Georgy Redkozubov
Approved revision: 183
Merged at revision: 183
Proposed branch: lp:~stevanr/linaro-license-protection/fix-build-info-splicing
Merge into: lp:~linaro-automation/linaro-license-protection/trunk
Diff against target: 25 lines (+5/-3)
1 file modified
license_protected_downloads/splice_build_infos.py (+5/-3)
To merge this branch: bzr merge lp:~stevanr/linaro-license-protection/fix-build-info-splicing
Reviewer Review Type Date Requested Status
Georgy Redkozubov Approve
Review via email: mp+160324@code.launchpad.net

Description of the change

Fix problem with non found files in BUILD-INFO.txt.
Fix error with write_from_array method call.

To post a comment you must log in.
Revision history for this message
Georgy Redkozubov (gesha) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'license_protected_downloads/splice_build_infos.py'
2--- license_protected_downloads/splice_build_infos.py 2013-04-19 12:13:03 +0000
3+++ license_protected_downloads/splice_build_infos.py 2013-04-23 10:35:32 +0000
4@@ -19,8 +19,10 @@
5 for filename in files:
6 if path == build_info_path:
7 if filename not in IGNORED_FILES:
8- self.build_infos.append(
9- BuildInfo(os.path.join(path, filename)))
10+ build_info = BuildInfo(os.path.join(path,
11+ filename))
12+ if len(build_info.file_info_array[0]):
13+ self.build_infos.append(build_info)
14
15 def splice(self, build_info_path):
16
17@@ -29,7 +31,7 @@
18 build_info_res[build_info.fname] = build_info.file_info_array
19
20 build_info_res = self.merge_duplicates(build_info_res)
21- BuildInfo.write_from_array(build_info_res, build_info_path)
22+ BuildInfo.write_from_array([build_info_res], build_info_path)
23
24 @classmethod
25 def merge_duplicates(cls, build_info_dict):

Subscribers

People subscribed via source and target branches