Cheat with ugly
authorDaniel Feldroy <daniel@feldroy.com>
Mon, 21 Sep 2020 18:18:58 +0000 (11:18 -0700)
committerDaniel Feldroy <daniel@feldroy.com>
Mon, 21 Sep 2020 18:18:58 +0000 (11:18 -0700)
setup.py

index e5398c97f6fe758f56003445fde9847626ccf3e9..6759c399ceb05e6084ae0a98c100208b04c24a17 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -26,8 +26,8 @@ if sys.argv[-1] == "publish":
     try:
         import wheel
         import twine
-    except (ImportError, ModuleNotFoundError):
-        raise ModuleNotFoundError('Run "pip install wheel twine"')
+    except: # Yes, this is not how we usually do try/except
+        raise ImportError('Run "pip install wheel twine"')
     os.system("python setup.py sdist bdist_wheel")
     os.system("twine upload dist/*")
     os.system("git tag -a %s -m 'version %s'" % (__version__, __version__))