From 3abb829c19d118e014fee8766c773a4c0a2188a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Tue, 15 May 2012 12:09:29 +0200 Subject: [PATCH] catch unicode decoding error --- bin/is | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/is b/bin/is index 53e7f89..a5e3a28 100755 --- a/bin/is +++ b/bin/is @@ -711,11 +711,13 @@ def main(): # let's go options.func(options) exit(0) - except Exception as e: - error(u"%s." % e) + except UnicodeDecodeError as e: + error("Unable to decode some characters. Check your locale settings.") except KeyboardInterrupt: warn("Keyboard Interrupted") exit(1) + except Exception as e: + error(u"%s." % e) # Entry point if __name__ == '__main__': -- GitLab