comparison paint/package.py @ 45:bb0813966bff

python 2.4 compatability
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 02 Apr 2012 10:40:52 -0700
parents 5e2e74cc5ad8
children 213cf933366d
comparison
equal deleted inserted replaced
44:14556787478c 45:bb0813966bff
125 125
126 # setup the egg info 126 # setup the egg info
127 exception = None 127 exception = None
128 try: 128 try:
129 code = call([sys.executable, 'setup.py', 'egg_info'], cwd=directory, stdout=subprocess.PIPE) 129 code = call([sys.executable, 'setup.py', 'egg_info'], cwd=directory, stdout=subprocess.PIPE)
130 except BaseException, exception: 130 except Exception, exception:
131 pass 131 pass
132 if code or exception: 132 if code or exception:
133 message = """Failure to generate egg_info 133 message = """Failure to generate egg_info
134 - src: %s 134 - src: %s
135 - directory: %s 135 - directory: %s
158 # return cached value 158 # return cached value
159 return self._pkg_info_path 159 return self._pkg_info_path
160 160
161 try: 161 try:
162 egg_info = self._egg_info() 162 egg_info = self._egg_info()
163 except BaseException, exception: 163 except Exception, exception:
164 # try to get the package info from a file 164 # try to get the package info from a file
165 path = self._path() 165 path = self._path()
166 pkg_info = os.path.join(path, 'PKG-INFO') 166 pkg_info = os.path.join(path, 'PKG-INFO')
167 if os.path.exists(pkg_info): 167 if os.path.exists(pkg_info):
168 self._pkg_info_path = pkg_info 168 self._pkg_info_path = pkg_info