Commit fd965830 authored by Iustin Pop's avatar Iustin Pop
Browse files

Handle better broken disks

While running burnin:
  File "/usr/lib/python2.4/site-packages/ganeti/objects.py", line 497, in __str__
    val += ", size=%dm)>" % self.size
TypeError: int argument required

This happened while handling another error, so we lose the original
error information.

So we should try to handle this better.

Reviewed-by: ultrotter
parent d3b4cf9f
......@@ -494,7 +494,10 @@ class Disk(ConfigObject):
val += ", not visible"
else:
val += ", visible as /dev/%s" % self.iv_name
val += ", size=%dm)>" % self.size
if isinstance(self.size, int):
val += ", size=%dm)>" % self.size
else:
val += ", size='%s')>" % (self.size,)
return val
def Verify(self):
......
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