]> git.rkrishnan.org Git - tahoe-lafs/zfec.git/commitdiff
misc/show-tool-versions.py: show setuptools version
authorzooko <zooko@zooko.com>
Wed, 17 Jun 2009 18:20:39 +0000 (23:50 +0530)
committerzooko <zooko@zooko.com>
Wed, 17 Jun 2009 18:20:39 +0000 (23:50 +0530)
Ignore-this: b0ae5935f2642954f013d7087c16e1f6

darcs-hash:f222f4adc0e4b9589a937cffe054ff55c62423ce

misc/show-tool-versions.py

index 13e7263b71b94e7486d829180a76bdec1f959be6..820eb0113b34935aabb246839d82d3824b026d68 100755 (executable)
@@ -9,7 +9,7 @@ try:
     out = subprocess.Popen(["buildbot", "--version"],
                            stdout=subprocess.PIPE).communicate()[0]
     print "buildbot:", out.replace("\n", " ")
-except OSError:
+except EnvironmentError:
     pass
 
 try:
@@ -20,7 +20,7 @@ try:
     print
     print "darcs:", out.replace("\n", " ")
     print full.rstrip()
-except OSError:
+except EnvironmentError:
     pass
 
 try:
@@ -28,6 +28,13 @@ try:
     out = platform.platform()
     print
     print "platform:", out.replace("\n", " ")
-    print full.rstrip()
-except OSError:
+except EnvironmentError:
+    pass
+
+try:
+    import pkg_resources
+    out = str(pkg_resources.require("setuptools"))
+    print
+    print "setuptools:", out.replace("\n", " ")
+except EnvironmentError:
     pass