>> @@ -565,7 +571,7 @@
>> session.wait_home_screen()
>> except:
>> # ignore home screen exception if it is a health check job.
>> - if not (self.context.job_data.has_key("health_check") and self.context.job_data["health_check"] == True):
>> + if not ('health_check' in self.context.job_data and self.context.job_data["health_check"] is True):
>
> isn't `x is True` equivalent to `x`? Or do we need to explicitly only accept
> True as a truth value there?
Please please pelase never write a literal on either side of an 'is' test!
Antonio Terceiro <email address hidden> writes:
>> @@ -565,7 +571,7 @@ wait_home_ screen( ) job_data. has_key( "health_ check") and self.context. job_data[ "health_ check"] == True): job_data and self.context. job_data[ "health_ check"] is True):
>> session.
>> except:
>> # ignore home screen exception if it is a health check job.
>> - if not (self.context.
>> + if not ('health_check' in self.context.
>
> isn't `x is True` equivalent to `x`? Or do we need to explicitly only accept
> True as a truth value there?
Please please pelase never write a literal on either side of an 'is' test!
Cheers,
mwh