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

Submitted by Dylan Baker on May 18, 2015, 5:57 p.m.

Details

Message ID 1431971870-20138-9-git-send-email-baker.dylan.c@gmail.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Dylan Baker May 18, 2015, 5:57 p.m.
This removes a bunch of except boilerplate code.

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

Patch hide | download patch | download mbox

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