summaryrefslogtreecommitdiff
path: root/morphlib/app.py
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2013-03-01 10:52:31 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2013-03-01 10:52:31 +0000
commit25d0ff32187362dc14a862b4964a6a91a2af7b04 (patch)
treeb3ba38c3b9ac82c40fc9f3618562c104edb4f3ce /morphlib/app.py
parentff7980a4ddadbcad93acecaa94cdcfa2c6c8c244 (diff)
downloadmorph-25d0ff32187362dc14a862b4964a6a91a2af7b04.tar.gz
Fix settings['tempdir'] not being set
Diffstat (limited to 'morphlib/app.py')
-rwxr-xr-xmorphlib/app.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index eaba5dd9..21e18e32 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -193,6 +193,11 @@ class Morph(cliapp.Application):
if self.settings['compiler-cache-dir'] is None:
self.settings['compiler-cache-dir'] = os.path.join(
self.settings['cachedir'], 'ccache')
+ if self.settings['tempdir'] is None:
+ if 'TMPDIR' in os.environ:
+ self.settings['tempdir'] = os.environ['TMPDIR']
+ else:
+ self.settings['tempdir'] = '/tmp'
if 'MORPH_DUMP_PROCESSED_CONFIG' in os.environ:
self.settings.dump_config(sys.stdout)
sys.exit(0)