From 3a470f8eed9b92a98adff8040c02e7a7ece8bc88 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 28 Oct 2007 05:02:10 +0000 Subject: [PATCH] Fix for python 2.4 --- src/libprs500/trac/download/download.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libprs500/trac/download/download.py b/src/libprs500/trac/download/download.py index 3221b2c1cc..00c299b115 100644 --- a/src/libprs500/trac/download/download.py +++ b/src/libprs500/trac/download/download.py @@ -64,7 +64,9 @@ class Distribution(object): offset = 0 if not self.is_generic: index = self.DISTRO_MAP[self.os] - self.as_root = True if os == 'debian' else self.AS_ROOT[index-2] + if os == 'debian': + self.as_root = True + else: self.AS_ROOT[index-2] prefix = '' if self.as_root else 'sudo ' cmd = prefix + self.INSTALLERS[index-2] pre = ' \\\n '.ljust(len(cmd)+3) @@ -72,7 +74,8 @@ class Distribution(object): if len(cmd) > 70+offset: offset += 70 cmd += pre - cmd += ' ' + dep[index] if dep[index] else '' + cmd += ' ' + if dep[index]: cmd += dep[index] self.command = cmd.strip() if os == 'debian': self.command += '\n'+prefix + 'cp -R /usr/share/pycentral/fonttools/site-packages/FontTools* /usr/lib/python2.5/site-packages/'