made find revision method compatible with python 2.3

This commit is contained in:
Nick Bolton 2011-01-23 23:03:28 +00:00
parent 3b3d292f0f
commit 443647a2b1

View File

@ -404,6 +404,10 @@ class InternalCommands:
print self.find_revision()
def find_revision(self):
if sys.version_info < (2, 4):
import commands
stdout = commands.getoutput('svn info')
else:
p = subprocess.Popen(['svn', 'info'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
@ -622,7 +626,7 @@ class InternalCommands:
elif type == 'mac':
#ext = 'dmg'
ext = 'zip'
platform = self.macPackageName
platform = self.getMacPackageName()
if not platform:
raise Exception('Unable to detect package platform.')