From f317cad84ec38d83e69c83d85cb924e589bab17d 2013-09-24 04:48:39 From: MinRK Date: 2013-09-24 04:48:39 Subject: [PATCH] catch unicode error listing profiles there can be garbage files on the filesystem, and we shouldn't be bothered by them. --- diff --git a/IPython/core/profileapp.py b/IPython/core/profileapp.py index 4235789..79bfff0 100644 --- a/IPython/core/profileapp.py +++ b/IPython/core/profileapp.py @@ -99,7 +99,10 @@ def list_profiles_in(path): files = os.listdir(path) profiles = [] for f in files: - full_path = os.path.join(path, f) + try: + full_path = os.path.join(path, f) + except UnicodeError: + continue if os.path.isdir(full_path) and f.startswith('profile_'): profiles.append(f.split('_',1)[-1]) return profiles