From bfb6b9f4c4cb0c953914cbb57114095d11510b4d Mon Sep 17 00:00:00 2001 From: toblu302 Date: Sun, 28 Mar 2021 23:33:39 +0200 Subject: [PATCH] Fix python3 compability issues in miniedit (#1059) --- examples/miniedit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/miniedit.py b/examples/miniedit.py index 2251d4b..7d207e1 100755 --- a/examples/miniedit.py +++ b/examples/miniedit.py @@ -1449,7 +1449,7 @@ class MiniEdit( Frame ): # Load application preferences if 'application' in loadedTopology: - self.appPrefs = dict(self.appPrefs.items() + loadedTopology['application'].items()) + self.appPrefs.update(loadedTopology['application']) if "ovsOf10" not in self.appPrefs["openFlowVersions"]: self.appPrefs["openFlowVersions"]["ovsOf10"] = '0' if "ovsOf11" not in self.appPrefs["openFlowVersions"]: @@ -1683,7 +1683,7 @@ class MiniEdit( Frame ): savingDictionary['application'] = self.appPrefs try: - f = open(fileName, 'wb') + f = open(fileName, 'w') f.write(json.dumps(savingDictionary, sort_keys=True, indent=4, separators=(',', ': '))) # pylint: disable=broad-except except Exception as er: @@ -1702,7 +1702,7 @@ class MiniEdit( Frame ): fileName = tkFileDialog.asksaveasfilename(filetypes=myFormats ,title="Export the topology as...") if len(fileName ) > 0: # debug( "Now saving under %s\n" % fileName ) - f = open(fileName, 'wb') + f = open(fileName, 'w') f.write("#!/usr/bin/env python\n") f.write("\n")