From: Michael Tremer Date: Thu, 19 Mar 2015 16:12:45 +0000 (+0100) Subject: fireinfo: Fix creating images for half-empty profiles X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0c9a14eb4217d180dbe22988255c825f8f452f4;p=ipfire.org.git fireinfo: Fix creating images for half-empty profiles --- diff --git a/webapp/backend/fireinfo.py b/webapp/backend/fireinfo.py index 4aab91e7..c6144088 100644 --- a/webapp/backend/fireinfo.py +++ b/webapp/backend/fireinfo.py @@ -797,7 +797,7 @@ class Profile(Object): @property def friendly_memory(self): - return util.format_size(self.memory) + return util.format_size(self.memory or 0) # Storage diff --git a/webapp/backend/iuse.py b/webapp/backend/iuse.py index 5faadcc9..0da525aa 100644 --- a/webapp/backend/iuse.py +++ b/webapp/backend/iuse.py @@ -163,7 +163,9 @@ class Image1(ImageObject): # Otherwise show some general hardware information of the machine else: - line2.append(self.profile.processor.friendly_string) + if self.profile.processor: + line2.append(self.profile.processor.friendly_string) + line2.append(self.profile.friendly_memory) self.draw_text((225, 9), " | ".join(line1))