Merge lp:~roadmr/checkbox/1306255 into lp:checkbox

Proposed by Daniel Manrique
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 2909
Merged at revision: 2928
Proposed branch: lp:~roadmr/checkbox/1306255
Merge into: lp:checkbox
Diff against target: 14 lines (+2/-2)
1 file modified
providers/plainbox-provider-resource-generic/bin/cpuinfo_resource (+2/-2)
To merge this branch: bzr merge lp:~roadmr/checkbox/1306255
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+215305@code.launchpad.net

Commit message

cpuinfo_resource: avoid printing empty keys (rather, keys with empty values).

Description of the change

cpuinfo_resource: avoid printing empty keys (rather, keys with empty values).

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'providers/plainbox-provider-resource-generic/bin/cpuinfo_resource'
2--- providers/plainbox-provider-resource-generic/bin/cpuinfo_resource 2014-04-02 09:56:49 +0000
3+++ providers/plainbox-provider-resource-generic/bin/cpuinfo_resource 2014-04-10 21:07:11 +0000
4@@ -38,8 +38,8 @@
5 if posixpath.exists(FREQUENCY_FILENAME):
6 value = open(FREQUENCY_FILENAME).read().strip()
7 value = int(value) // 1000
8-
9- print("%s: %s" % (key, value))
10+ if value:
11+ print("%s: %s" % (key, value))
12
13
14 def main():

Subscribers

People subscribed via source and target branches