From f31f81c1b4bf38668b052f25a33a7bb0733dcb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20L=C3=A9one?= Date: Thu, 7 Sep 2017 10:34:19 +0200 Subject: [PATCH] Use OSError instead of FileNotFoundError to work on both py2 and py3 --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 6138e95..f6d6a15 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ class PublishCommand(Command): description = 'Build and publish the package.' user_options = [] - + @staticmethod def status(s): """Prints things in bold.""" @@ -62,7 +62,7 @@ class PublishCommand(Command): try: self.status('Removing previous builds…') rmtree(os.path.join(here, 'dist')) - except FileNotFoundError: + except OSError: pass self.status('Building Source and Wheel (universal) distribution…') @@ -108,7 +108,7 @@ setup( 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy' ], - # $ setup.py publish support. + # $ setup.py publish support. cmdclass={ 'publish': PublishCommand, },