mirror of
https://github.com/munki/munki.git
synced 2026-04-22 20:48:36 -05:00
tweaks to handle objc.pyobc_unicode (NSString) correctly
git-svn-id: http://munki.googlecode.com/svn/trunk@946 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -1586,7 +1586,7 @@ def listdir(path):
|
||||
"""OSX HFS+ string encoding safe listdir().
|
||||
|
||||
Args:
|
||||
path: str or unicode, path to list contents of
|
||||
path: path to list contents of
|
||||
Returns:
|
||||
list of contents, items as str or unicode types
|
||||
"""
|
||||
@@ -1605,7 +1605,7 @@ def listdir(path):
|
||||
if type(path) is str:
|
||||
path = unicode(path, 'utf-8')
|
||||
elif type(path) is not unicode:
|
||||
raise TypeError('path (%s) should be unicode or str' % str(path))
|
||||
path = unicode(path)
|
||||
return os.listdir(path)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user