launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #13674
[Merge] lp:~jtv/maas/1.2-lint into lp:maas/1.2
Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/1.2-lint into lp:maas/1.2.
Commit message:
Backport a lint fix from trunk to 1.2.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~jtv/maas/1.2-lint/+merge/131209
Jeroen
--
https://code.launchpad.net/~jtv/maas/1.2-lint/+merge/131209
Your team MAAS Maintainers is requested to review the proposed merge of lp:~jtv/maas/1.2-lint into lp:maas/1.2.
=== modified file 'src/maasserver/models/node.py'
--- src/maasserver/models/node.py 2012-10-17 05:19:43 +0000
+++ src/maasserver/models/node.py 2012-10-24 15:17:21 +0000
@@ -359,7 +359,8 @@
_xpath_memory_bytes = (
"sum(//node[@id='memory']/size[@units='bytes']"
- "|//node[starts-with(@id, 'memory:')]/node[starts-with(@id, 'bank:')]/size[@units='bytes'])"
+ "|//node[starts-with(@id, 'memory:')]"
+ "/node[starts-with(@id, 'bank:')]/size[@units='bytes'])"
"div 1024 div 1024")
=== modified file 'src/maasserver/tests/test_node.py'
--- src/maasserver/tests/test_node.py 2012-10-17 05:19:43 +0000
+++ src/maasserver/tests/test_node.py 2012-10-24 15:17:21 +0000
@@ -545,7 +545,8 @@
)
node.set_hardware_details(xmlbytes)
node = reload_object(node)
- expected = (4294967296 + 3221225472 + 536879812) / 2**20
+ mega = 2 ** 20
+ expected = (4294967296 + 3221225472 + 536879812) / mega
self.assertEqual(expected, node.memory)
def test_hardware_updates_tags_match(self):
Follow ups