-
Type: Bug
-
Status: Open (View Workflow)
-
Priority: Normal
-
Resolution: Unresolved
-
Component/s: tron_actorcore
-
Labels:None
Transferring headers from gen2Actor has uncovered an old mistake. The symptom is that only one of:
header1 = r"""OBSERVER = '"Name, Other Name"' / double-quoted""" header2 = r"""OBSERVER = 'Name' / Not double-quoted"""
can make it through from one of:
cmd.inform('header=%s' % (header)) cmd.inform('header=%s' % (repr(header)))
to an identical string at the listener:
header = self.actor.models['gen2']['header'].values[0]
I believe that the issue boils down to a pre-SDSS choice not to internally use repr to encode a string (because it does too much and makes strings ugly), but not fixing the decoding when SDSS switched to the opscore parser. Basically:
from opscore.utility.qstr import qstr s = "any horrible thing" # OK eval(repr(s) == s # By definition # Not OK eval(qstr(repr(s)) != s # double-quotes get an additional escaping. qstr(s) != s # Of course not.