[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] proper way to check fo undefined classAd in python



thanks a lot Jason, also also thanks Brian and Ceyhun !
I feel good about going forward now
Stefano

On 22/06/2022 15:51, Jason Patton wrote:
Hi Stefano,

Using "==" and "!=" operators with classad.Value.Error and classad.Value.Undefined results in an classad.ExprTree getting returned since HTCondor 8.9. As you have stumbled upon, using "is" and "is not" does what you want, and is the correct syntax going forward.

Brian Bockelman gave an explanation to a similar question about classad.Value.Error last year about why this behavior was changed:

https://www-auth.cs.wisc.edu/lists/htcondor-users/2021-May/msg00025.shtml

Jason Patton

On 6/21/22 12:37 PM, Stefano Belforte wrote:
yes, this works as well
ÂÂif not( someAd == classad.Value.Undefined)
and the fact that it behave differently than using != is a bit unpleasant

Kindly let me know what's the correct syntax

Stefano
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/