Commit aa4f5848 authored by Rafael Monnerat's avatar Rafael Monnerat

replace parameter is not present on python2.6

  Include backward compatibility to python2.6
parent 48639a6d
...@@ -705,8 +705,13 @@ class Installer: ...@@ -705,8 +705,13 @@ class Installer:
# recipes. Make sure that whatever correct version # recipes. Make sure that whatever correct version
# we've just installed is the active version, # we've just installed is the active version,
# hence the ``replace=True``. # hence the ``replace=True``.
ws.add(dist, replace=True) try:
ws.add(dist, replace=True)
except TypeError:
# We are running in python 2.6
# remove the key to force the replacement
ws.by_key.pop(dist.key, None)
ws.add(dist)
finally: finally:
if tmp != self._download_cache: if tmp != self._download_cache:
shutil.rmtree(tmp) shutil.rmtree(tmp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment