diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-06 00:22:17 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-06 00:22:17 (GMT) |
commit | 780d39e549df18d40eb01e4ff07c2274ab72d720 (patch) | |
tree | 3552e074c2dcc7071df7540131bd5d710eb91b65 | |
parent | d424f48a08f1ae4ffc2b85e8dcccd4065ed2c5cc (diff) |
Define os_info outside the try block
Otherwise if an exception israised it
will be undefined.
-rw-r--r-- | devbot/plugins/ubuntu.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/devbot/plugins/ubuntu.py b/devbot/plugins/ubuntu.py index dd0efde..b56278e 100644 --- a/devbot/plugins/ubuntu.py +++ b/devbot/plugins/ubuntu.py @@ -26,9 +26,10 @@ class DistroInfo(interfaces.DistroInfo): elif arch == "x86_64": self.lib_dir = "lib/x86_64-linux-gnu" + os_info = {} + try: release = open(self._OS_RELEASE_PATH).read().strip() - os_info = {} for line in release.split("\n"): split = line.strip().split("=") os_info[split[0]] = split[1].replace("\"", "") |