From d4ea1f81012a9446b8e8cb31bf63c644af3a711f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 30 Jul 2007 12:45:01 +0200 Subject: [PATCH] Do not traceback if bundle version is not integer. --- sugar/activity/bundle.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sugar/activity/bundle.py b/sugar/activity/bundle.py index 74016d8d..a9c246d8 100644 --- a/sugar/activity/bundle.py +++ b/sugar/activity/bundle.py @@ -142,7 +142,11 @@ class Bundle: self._icon = cp.get(section, 'icon') if cp.has_option(section, 'activity_version'): - self._activity_version = int(cp.get(section, 'activity_version')) + version = cp.get(section, 'activity_version') + try: + self._activity_version = int(version) + except ValueError: + self._valid = False def _parse_linfo(self, linfo_file): cp = ConfigParser()