Bruno Desthuilliers wrote:
if cmd: self.cmd = cmd.replace..And what if cmd happens to be the empty string ?-) ok, me --->[]
Right, I didn't think much when I wrote that. Anyway, that's back to square one.
I will probably go for this anyway:assert isinstance(cmd, basestring) or cmd is None, 'cmd has to be string or None'
if cmd: cmd = cmd.replace(r'${ADDR}',ip) self.cmd = cmd -- http://mail.python.org/mailman/listinfo/python-list