Merge lp:~cr3/checkbox/memory_test into lp:checkbox

Proposed by Marc Tardif
Status: Merged
Merged at revision: 1435
Proposed branch: lp:~cr3/checkbox/memory_test
Merge into: lp:checkbox
Diff against target: 22 lines (+3/-3)
1 file modified
scripts/memory_test (+3/-3)
To merge this branch: bzr merge lp:~cr3/checkbox/memory_test
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+110146@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

The joys of Python 3. Looks good, I tested it and it doesn't crash on my laptop, at least. Merging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/memory_test'
2--- scripts/memory_test 2012-06-06 20:56:17 +0000
3+++ scripts/memory_test 2012-06-13 19:25:23 +0000
4@@ -32,15 +32,15 @@
5 if len(tokens) == 3:
6 if "MemTotal:" == tokens[0].strip():
7 self.system_memory = \
8- int(tokens[1].strip()) / 1024
9+ int(tokens[1].strip()) // 1024
10 elif tokens[0].strip() in ["MemFree:",
11 "Cached:",
12 "Buffers:"]:
13 self.free_memory += \
14- int(tokens[1].strip()) / 1024
15+ int(tokens[1].strip()) // 1024
16 elif "SwapTotal:" == tokens[0].strip():
17 self.swap_memory = \
18- int(tokens[1].strip()) / 1024
19+ int(tokens[1].strip()) // 1024
20 else:
21 break
22 finally:

Subscribers

People subscribed via source and target branches