fixed issue 1179, welcome.w2p created if not exists

This commit is contained in:
mdipierro
2012-11-24 10:48:27 -06:00
parent 6324ed7a9c
commit d2dd3d0ac6
3 changed files with 12 additions and 9 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.2.1 (2012-11-24 10:35:09) stable
Version 2.2.1 (2012-11-24 10:47:44) stable
+11
View File
@@ -241,6 +241,17 @@ def w2p_pack(filename, path, compiled=False):
def w2p_unpack(filename, path, delete_tar=True):
if filename=='welcome.w2p' and (
not os.path.exists('welcome.w2p') or \
os.path.exists('NEWINSTALL')):
try:
w2p_pack('welcome.w2p', 'applications/welcome')
os.unlink('NEWINSTALL')
except:
msg = "New installation: unable to create welcome.w2p file"
sys.stderr.write(msg)
filename = abspath(filename)
path = abspath(path)
if filename[-4:] == '.w2p' or filename[-3:] == '.gz':
-8
View File
@@ -975,14 +975,6 @@ def console():
if not os.path.exists('applications/__init__.py'):
write_file('applications/__init__.py', '')
if not os.path.exists('welcome.w2p') or os.path.exists('NEWINSTALL'):
try:
w2p_pack('welcome.w2p', 'applications/welcome')
os.unlink('NEWINSTALL')
except:
msg = "New installation: unable to create welcome.w2p file"
sys.stderr.write(msg)
return (options, args)