mk a écrit :
if isinstance(cmd, str):
self.cmd = cmd.replace(r'${ADDR}',ip)
else:
self.cmd = cmd
What could "cmd" be except a string ? From other posts here, I guess it's either a string or None ? If yes, then I'd go for this:
if cmd:
cmd = cmd.replace(r'${ADDR}',ip)
self.cmd = cmd
--
http://mail.python.org/mailman/listinfo/python-list
