From 08da2b4fddf05a29a1b9fc4fee88587cce1ccde1 2007-04-30 11:08:46 From: vivainio Date: 2007-04-30 11:08:46 Subject: [PATCH] croak cleanly on non-ascii home dir names --- diff --git a/IPython/Release.py b/IPython/Release.py index 89f5a8a..8c49f6b 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Release data for the IPython project. -$Id: Release.py 2281 2007-04-27 11:08:18Z vivainio $""" +$Id: Release.py 2297 2007-04-30 11:08:46Z vivainio $""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez @@ -25,7 +25,7 @@ name = 'ipython' revision = '2280' #version = '0.8.1.svn.r' + revision.rstrip('M') -version = '0.8.1.rc2' +version = '0.8.1.rc3' description = "An enhanced interactive Python shell." diff --git a/IPython/iplib.py b/IPython/iplib.py index e2c5693..e95c8d4 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -6,7 +6,7 @@ Requires Python 2.3 or newer. This file contains all the classes and helper functions specific to IPython. -$Id: iplib.py 2266 2007-04-22 18:55:48Z jstenar $ +$Id: iplib.py 2297 2007-04-30 11:08:46Z vivainio $ """ #***************************************************************************** @@ -659,8 +659,15 @@ class InteractiveShell(object,Magic): self.rc already has reasonable default values at this point. """ rc = self.rc - - self.db = pickleshare.PickleShareDB(rc.ipythondir + "/db") + try: + self.db = pickleshare.PickleShareDB(rc.ipythondir + "/db") + except exceptions.UnicodeDecodeError: + print "Your ipythondir can't be decoded to unicode!" + print "Please set HOME environment variable to something that" + print r"only has ASCII characters, e.g. c:\home" + print "Now it is",rc.ipythondir + sys.exit() + def post_config_initialization(self): """Post configuration init method diff --git a/doc/ChangeLog b/doc/ChangeLog index 67a790f..8d9bf1f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2007-04-30 Ville Vainio + + * iplib.py: (pre_config_initialization) Catch UnicodeDecodeError if the + user has illegal (non-ascii) home directory name + 2007-04-27 Ville Vainio * platutils_win32.py: implement set_term_title for windows @@ -5,7 +10,6 @@ * Update version number * ipy_profile_sh.py: more informative prompt (2 dir levels) - 2007-04-26 Walter Doerwald