Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-05-20 11:41:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-05-20 11:41:21 +0400
commit02893ff5ae59185e101b4a2cd7cce81974efd0ea (patch)
treec17224f3b6a0fd0a9c41c6c18dcfd55542582802 /release
parentc0dcbacd4b492fbb06b895fd454583ca75ad6405 (diff)
Blenders installs where the scripts dir was not writable could not load the console. This should fix it.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/console.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/release/scripts/console.py b/release/scripts/console.py
index 4b187b6684d..e253e3c9857 100644
--- a/release/scripts/console.py
+++ b/release/scripts/console.py
@@ -782,8 +782,13 @@ if scriptDir:
if not sys.exists(console_autoexec):
# touch the file
- cmdBuffer.append(cmdLine('...console_autoexec.py not found, making new in scripts dir', 1, None))
- open(console_autoexec, 'w').close()
+ try:
+ open(console_autoexec, 'w').close()
+ cmdBuffer.append(cmdLine('...console_autoexec.py not found, making new in scripts dir', 1, None))
+ except:
+ cmdBuffer.append(cmdLine('...console_autoexec.py could not write, this is ok', 1, None))
+ scriptDir = None # make sure we only use this for console_autoexec.py
+
else:
cmdBuffer.append(cmdLine('...Using existing console_autoexec.py in scripts dir', 1, None))