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

Re: [HTCondor-users] how to validate Collector and Schedd initilization with the python bindings?



Jose,

I'm not sure if this is the *best* way, but I sometimes do:


collector = htcondor.Collector()
try:
 collector.query(constraint="False") # should return an empty list if Collector exists
except...

schedd = htcondor.Schedd()
try:
 schedd.xquery(limit = 0) # should return an "empty" iterator if Schedd exists
except...


Jason

On Fri, May 25, 2018 at 4:10 PM, Jose Caballero <jcaballero.hep@xxxxxxxxx> wrote:
Hi,

naively, one would expect an Exception when doing something like this

    Âimport htcondor
    Âcoll = htcondor.Collector(" a fake collector ")

which is not the case.
Ditto with Schedd( )

What is the best way to test it right after initialization w/o
triggering any real action?

Thanks,
Jose
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@cs.wisc.edu 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/