From 109c9d10045dfa1391b5d5de2a1c4d445f52c8f2 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 21 Jan 2009 07:14:03 +0000 Subject: [PATCH] don't traceback when there is no temp folder. Fixes #4629 --- src/common/configpaths.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/configpaths.py b/src/common/configpaths.py index 9f7285635..19e45aef3 100644 --- a/src/common/configpaths.py +++ b/src/common/configpaths.py @@ -121,7 +121,12 @@ class ConfigPaths: datadir = u'..' self.add('DATA', os.path.join(datadir, windowsify(u'data'))) self.add('HOME', fse(os.path.expanduser('~'))) - self.add('TMP', fse(tempfile.gettempdir())) + try: + self.add('TMP', fse(tempfile.gettempdir())) + except IOError, e: + print >> sys.stderr, 'Error opening tmp folder: %s\nUsing %s' % ( + str(e), os.path.expanduser('~')) + self.add('TMP', fse(os.path.expanduser('~'))) try: import svn_config