[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [10737] trunk/blender/release/scripts/ console.py: Blenders installs where the scripts dir was not writable could not load the console .

Campbell Barton cbarton at metavr.com
Sun May 20 09:41:22 CEST 2007


Revision: 10737
          https://svn.blender.org//revision/?rev=10737&view=rev
Author:   campbellbarton
Date:     2007-05-20 09:41:21 +0200 (Sun, 20 May 2007)

Log Message:
-----------
Blenders installs where the scripts dir was not writable could not load the console. This should fix it.

Modified Paths:
--------------
    trunk/blender/release/scripts/console.py

Modified: trunk/blender/release/scripts/console.py
===================================================================
--- trunk/blender/release/scripts/console.py	2007-05-19 23:15:36 UTC (rev 10736)
+++ trunk/blender/release/scripts/console.py	2007-05-20 07:41:21 UTC (rev 10737)
@@ -782,8 +782,13 @@
 
 	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))
 





More information about the Bf-blender-cvs mailing list