fixed issue 1179, welcome.w2p created if not exists
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.2.1 (2012-11-24 10:35:09) stable
|
Version 2.2.1 (2012-11-24 10:47:44) stable
|
||||||
|
|||||||
@@ -241,6 +241,17 @@ def w2p_pack(filename, path, compiled=False):
|
|||||||
|
|
||||||
|
|
||||||
def w2p_unpack(filename, path, delete_tar=True):
|
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)
|
filename = abspath(filename)
|
||||||
path = abspath(path)
|
path = abspath(path)
|
||||||
if filename[-4:] == '.w2p' or filename[-3:] == '.gz':
|
if filename[-4:] == '.w2p' or filename[-3:] == '.gz':
|
||||||
|
|||||||
@@ -975,14 +975,6 @@ def console():
|
|||||||
if not os.path.exists('applications/__init__.py'):
|
if not os.path.exists('applications/__init__.py'):
|
||||||
write_file('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)
|
return (options, args)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user