]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: patch to fix bug in our latest ez_setup.py if pkg_resources can't be imported
authorZooko O'Whielacronx <zooko@zooko.com>
Thu, 4 Oct 2007 20:09:20 +0000 (13:09 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Thu, 4 Oct 2007 20:09:20 +0000 (13:09 -0700)
ez_setup.py

index a14f7350f23ea077a6014d1ab76021afa7042a41..26d48220577073561841d4a02262785e9b91b32a 100644 (file)
@@ -48,7 +48,11 @@ def setuptools_is_new_enough(required_version):
     """Return True if setuptools is already installed and has a version
     number >= required_version."""
     verstr = get_setuptools_version()
-    import pkg_resources
+    try:
+        import pkg_resources
+    except ImportError:
+        # Well then I guess it is definitely not new enough.
+        return False
     try:
         ver = pkg_resources.parse_version(verstr)
         newenough = ver and ver >= pkg_resources.parse_version(required_version)