From a0c9a14eb4217d180dbe22988255c825f8f452f4 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 19 Mar 2015 17:12:45 +0100 Subject: [PATCH] fireinfo: Fix creating images for half-empty profiles --- webapp/backend/fireinfo.py | 2 +- webapp/backend/iuse.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/backend/fireinfo.py b/webapp/backend/fireinfo.py index 4aab91e..c614408 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 5faadcc..0da525a 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)) -- 2.39.5