Merge pull request #27 from sieben/oserror

Use OSError instead of FileNotFoundError to work on both py2 and py3
This commit is contained in:
Kenneth Reitz 2017-09-07 10:18:12 -04:00 committed by GitHub
commit 9f3571a811

View File

@ -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,
},