[Piglit] [PATCH v2 08/16] tests/deqp_gles3.py: Use PiglitConfig.safe_get

Dylan Baker baker.dylan.c at gmail.com
Mon May 18 10:57:42 PDT 2015


This removes a bunch of except boilerplate code.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/deqp_gles3.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tests/deqp_gles3.py b/tests/deqp_gles3.py
index c55eb66..0ed6a61 100644
--- a/tests/deqp_gles3.py
+++ b/tests/deqp_gles3.py
@@ -18,7 +18,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-import ConfigParser
 import os
 import subprocess
 import xml.etree.cElementTree as ET
@@ -65,12 +64,7 @@ def get_option(env_varname, config_option):
     if opt is not None:
         return opt
 
-    try:
-        opt = core.PIGLIT_CONFIG.get(config_option[0], config_option[1])
-    except ConfigParser.NoSectionError:
-        pass
-    except ConfigParser.NoOptionError:
-        pass
+    opt = core.PIGLIT_CONFIG.safe_get(config_option[0], config_option[1])
 
     return opt
 
-- 
2.4.0



More information about the Piglit mailing list