On Tuesday, December 16, 2014 02:52:08 PM Chad Versace wrote:
> On 12/16/2014 02:10 PM, Dylan Baker wrote:
> > On Tuesday, December 16, 2014 01:49:20 PM Chad Versace wrote:
> 
> >> +    try:
> >> +        opt = framework.core.PIGLIT_CONFIG.get(config_option[0],
> >> +                                               config_option[1])
> >> +    except ConfigParser.NoSectionError:
> >> +        pass
> >> +    except ConfigParser.NoOptionError:
> >> +        pass
> > 
> > You should combine these
> 
> What's the syntax? I tried
> 
>     except ConfigParser.NoSectionError, ConfigParser.NoOptionError:
>         pass
> 
> but that failed to catch ConfigParser.NoOptionError.
> 
It requires that the tuple have the () around it.

except (ConfigParser.NoSectionError, ConfigParser.NoOptionError):
        pass

This is because of the legacy "except Exception, e" syntax.

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to