diff options
author | Guido van Rossum <guido@python.org> | 2007-05-02 19:09:54 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-02 19:09:54 (GMT) |
commit | ef87d6ed94780fe00250a551031023aeb2898365 (patch) | |
tree | 1f8989aaaec7ec5f8b2f26498317f2022bf85531 /Lib/plat-mac/EasyDialogs.py | |
parent | 572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (diff) | |
download | cpython-ef87d6ed94780fe00250a551031023aeb2898365.zip cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.gz cpython-ef87d6ed94780fe00250a551031023aeb2898365.tar.bz2 |
Rip out all the u"..." literals and calls to unicode().
Diffstat (limited to 'Lib/plat-mac/EasyDialogs.py')
-rw-r--r-- | Lib/plat-mac/EasyDialogs.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py index 1bca4cd..6d157f9 100644 --- a/Lib/plat-mac/EasyDialogs.py +++ b/Lib/plat-mac/EasyDialogs.py @@ -662,7 +662,7 @@ def AskFileForOpen( return tpwanted(rr.selection[0]) if issubclass(tpwanted, str): return tpwanted(rr.selection_fsr[0].as_pathname()) - if issubclass(tpwanted, unicode): + if issubclass(tpwanted, str): return tpwanted(rr.selection_fsr[0].as_pathname(), 'utf8') raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted) @@ -713,7 +713,7 @@ def AskFileForSave( raise TypeError, "Cannot pass wanted=FSRef to AskFileForSave" if issubclass(tpwanted, Carbon.File.FSSpec): return tpwanted(rr.selection[0]) - if issubclass(tpwanted, (str, unicode)): + if issubclass(tpwanted, (str, str)): if sys.platform == 'mac': fullpath = rr.selection[0].as_pathname() else: @@ -722,10 +722,10 @@ def AskFileForSave( pardir_fss = Carbon.File.FSSpec((vrefnum, dirid, '')) pardir_fsr = Carbon.File.FSRef(pardir_fss) pardir_path = pardir_fsr.FSRefMakePath() # This is utf-8 - name_utf8 = unicode(name, 'macroman').encode('utf8') + name_utf8 = str(name, 'macroman').encode('utf8') fullpath = os.path.join(pardir_path, name_utf8) - if issubclass(tpwanted, unicode): - return unicode(fullpath, 'utf8') + if issubclass(tpwanted, str): + return str(fullpath, 'utf8') return tpwanted(fullpath) raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted) @@ -775,7 +775,7 @@ def AskFolder( return tpwanted(rr.selection[0]) if issubclass(tpwanted, str): return tpwanted(rr.selection_fsr[0].as_pathname()) - if issubclass(tpwanted, unicode): + if issubclass(tpwanted, str): return tpwanted(rr.selection_fsr[0].as_pathname(), 'utf8') raise TypeError, "Unknown value for argument 'wanted': %s" % repr(tpwanted) |