Mercurial > cpython-lru_cache-weakref
diff Lib/lib-tk/tkFileDialog.py @ 31056:251717566e91 legacy-trunk
Convert path objects to strings in askdirectory. Fixes #852314.
Backported to 2.3.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Mon, 01 Dec 2003 21:04:22 +0000 |
| parents | deb9715bc8ae |
| children | c3a096bfbd6b |
line wrap: on
line diff
--- a/Lib/lib-tk/tkFileDialog.py Mon Dec 01 20:12:15 2003 +0000 +++ b/Lib/lib-tk/tkFileDialog.py Mon Dec 01 21:04:22 2003 +0000 @@ -105,6 +105,12 @@ 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
