From 6d3beeb823a8e78871789f412c96f28d220fcf3e Mon Sep 17 00:00:00 2001 From: Uggla Date: Fri, 4 Mar 2016 14:39:05 +0100 Subject: [PATCH] Avoid command line parsing error in getprefix() Several setup command line options like --help, raise an AttributeError exception --> just pass as in that case command line options are not useful to determine prefix. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ee366de..cc591e5 100755 --- a/setup.py +++ b/setup.py @@ -151,7 +151,7 @@ class DataFilesHelper(): dist.parse_config_files() try: dist.parse_command_line() - except distutils.errors.DistutilsArgError: + except (distutils.errors.DistutilsArgError, AttributeError): pass command = dist.get_command_obj('install') command.ensure_finalized()