From f21796d28ebf9328b68c6321d691b221457bafa6 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Wed, 1 Jul 2015 16:35:33 +0000 Subject: [PATCH] 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 --- jenkins/scripts/pypi-extract-universal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/scripts/pypi-extract-universal.py b/jenkins/scripts/pypi-extract-universal.py index e4fd7b8398..293f6add14 100644 --- a/jenkins/scripts/pypi-extract-universal.py +++ b/jenkins/scripts/pypi-extract-universal.py @@ -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")