Commits

Martin von Löwis  committed 38338c9

Convert path objects to strings in askdirectory. Fixes #852314.

  • Participants
  • Parent commits f5eab62
  • Branches 2.3

Comments (0)

Files changed (2)

File Lib/lib-tk/tkFileDialog.py

 
     def _fixresult(self, widget, result):
         if result:
+            # convert Tcl path objects to strings
+            try:
+                result = result.string
+            except AttributeError:
+                # it already is a string
+                pass
             # keep directory until next time
             self.options["initialdir"] = result
         self.directory = result # compatibility
 Extension modules
 -----------------
 
+- Bug #852314: Fix return type of tkFileDialog.askdirectory on Unix.
+
 - Bug #834676: Fix crashes when normalizing Hangul syllables.
 
 - Bug #703198: Ignore "b" and "t" in os.popen on Unix.