Commit 9661e882 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Skip garbage from the report

   If partition is None, it means the computer was reformated and there is garbage on it. It is meaningless to process this.
parent 23f35307
...@@ -48,7 +48,7 @@ else: ...@@ -48,7 +48,7 @@ else:
portal_type="Compute Partition", portal_type="Compute Partition",
validation_state="validated") validation_state="validated")
if partition.getSlapState() != 'busy': if partition is None or partition.getSlapState() != 'busy':
continue continue
assert partition.getSlapState() == 'busy', "partition %s is not busy" % reference assert partition.getSlapState() == 'busy', "partition %s is not busy" % reference
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment