mirror of https://github.com/python/cpython.git
Convert path objects to strings in askdirectory. Fixes #852314.
Backported to 2.3.
This commit is contained in:
parent
3375fc5a3b
commit
85f48e3b9b
|
@ -105,6 +105,12 @@ class Directory(Dialog):
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue