Hi all,does condor_chirp/the chirp python bindings support attribute types other than strings? Something like attributes as list or dictionary class ads https://htcondor.readthedocs.io/en/latest/man-pages/classads.html ð
With a native python list, the bindings throw an error [1] and a naive serialization like [2] ends in an undefined job attribute. It seems to work to do a manual serialization [3] (at least the string does not throw an error and gets up to the schedd). However I have not yet tried, if the string/list(?) ends up as list in ES when sending it via condor_adstash - so I am not sure, if the type(?) is actually a string or a list?
Packages are as of [4] Cheers, Thomas [1] >>> import htcondor.htchirp >>> with htcondor.htchirp.HTChirp() as chirp: ... chirp.connect() ... chirp.set_job_attr("MyTestList",['foo1','baz2','bar3']) ... Traceback (most recent call last): File "<stdin>", line 3, in <module>File "/usr/local/lib64/python3.6/site-packages/htcondor/htchirp/htchirp.py", line 705, in set_job_attr
quote(job_attribute), quote(attribute_value)File "/usr/local/lib64/python3.6/site-packages/htcondor/htchirp/htchirp.py", line 43, in quote
return escape.sub(replace, chirp_string) TypeError: expected string or bytes-like object [2] ... ... ... chirp.set_job_attr("MytestList",str(['foo1','baz2','bar3'])) ... chirp.disconnect() [3] ... ... ... chirp.set_job_attr("MyTestList","{'foo1','baz2','bar3'}") ... chirp.disconnect() [4] condor-9.0.4-1.el7.x86_64 condor-boinc-7.16.16-1.el7.x86_64 condor-classads-9.0.4-1.el7.x86_64 condor-externals-9.0.4-1.el7.x86_64 condor-procd-9.0.4-1.el7.x86_64 python2-condor-9.0.4-1.el7.x86_64 python3-condor-9.0.4-1.el7.x86_64
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature