Blenders installs where the scripts dir was not writable could not load the console...
authorCampbell Barton <ideasman42@gmail.com>
Sun, 20 May 2007 07:41:21 +0000 (07:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 20 May 2007 07:41:21 +0000 (07:41 +0000)
release/scripts/console.py

index 4b187b6684dfeea1129818e7d0876a1972ac0ce2..e253e3c985713c93b0017c1bb011858f56fada86 100644 (file)
@@ -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))