From 065e8eb834d65b4e0572611c16f7f2950db4512b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 11 May 2013 10:59:30 +0100 Subject: Verified that not isinstance(IOError(), os.error), so there's no value in this statement being in the try block. --HG-- branch : distribute extra : rebase_source : 79dc86f2251503336feaa3d3f99c744d0ea45887 --- pkg_resources.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg_resources.py') diff --git a/pkg_resources.py b/pkg_resources.py index 69601480..9d406e38 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1409,10 +1409,10 @@ class ZipProvider(EggProvider): ) timestamp = time.mktime(date_time) + if not WRITE_SUPPORT: + raise IOError('"os.rename" and "os.unlink" are not supported ' + 'on this platform') try: - if not WRITE_SUPPORT: - raise IOError('"os.rename" and "os.unlink" are not supported ' - 'on this platform') real_path = manager.get_cache_path( self.egg_name, self._parts(zip_path) -- cgit v1.2.1