diff --git a/rflib/ipc/RFProtocol.py b/rflib/ipc/RFProtocol.py index a36a36ec..76562d3e 100644 --- a/rflib/ipc/RFProtocol.py +++ b/rflib/ipc/RFProtocol.py @@ -312,7 +312,7 @@ def __str__(self): s += " dst_port: " + str(self.get_dst_port()) + "\n" s += " src_hwaddress: " + str(self.get_src_hwaddress()) + "\n" s += " dst_hwaddress: " + str(self.get_dst_hwaddress()) + "\n" - s += " is_removal: " + bool(self.get_is_removal()) + "\n" + s += " is_removal: " + str(self.get_is_removal()) + "\n" return s class FlowMod(MongoIPCMessage): @@ -433,7 +433,7 @@ def __str__(self): s += " dst_port: " + str(self.get_dst_port()) + "\n" s += " src_hwaddress: " + str(self.get_src_hwaddress()) + "\n" s += " dst_hwaddress: " + str(self.get_dst_hwaddress()) + "\n" - s += " is_removal: " + bool(self.get_is_removal()) + "\n" + s += " is_removal: " + str(self.get_is_removal()) + "\n" return s class DatapathPortRegister(MongoIPCMessage): diff --git a/rflib/ipc/msgen.py b/rflib/ipc/msgen.py index 292272c5..8cefb1c6 100644 --- a/rflib/ipc/msgen.py +++ b/rflib/ipc/msgen.py @@ -329,7 +329,7 @@ def genPy(messages, fname): g.addLine("s = \"{0}\\n\"".format(name)) for t, f in msg: value = "self.get_{0}()".format(f) - g.addLine("s += \" {0}: \" + {1} + \"\\n\"".format(f, pyExportType[t].format(value))) + g.addLine("s += \" {0}: \" + str({1}) + \"\\n\"".format(f, value)) g.addLine("return s") g.decreaseIndent() g.decreaseIndent()