Fix universal extraction in non-universal wheel
The pypi-extract-universal.py would raise ConfigParser.NoOptionError when inspecting a setup.cfg with a wheel section but no universal option. Guard against this by actually testing whether the option is there rather than merely whether the section exists. Change-Id: I7a907464e5b1dc211c7e4c4c2f3e6375b7a6085d
This commit is contained in:
@@ -20,7 +20,7 @@ universal = False
|
||||
|
||||
setup_cfg = ConfigParser.SafeConfigParser()
|
||||
setup_cfg.read("setup.cfg")
|
||||
if setup_cfg.has_section("wheel"):
|
||||
if setup_cfg.has_option("wheel", "universal"):
|
||||
universal = setup_cfg.getboolean("wheel", "universal")
|
||||
if universal:
|
||||
print("py2.py3")
|
||||
|
Reference in New Issue
Block a user