Merge pull request #1917 from cccaballero/NEWINSTALL_file_unlink
#1911 NEWINSTALL file unlink issue
This commit is contained in:
+9
-2
@@ -264,13 +264,20 @@ def w2p_pack(filename, path, compiled=False, filenames=None):
|
||||
|
||||
|
||||
def create_welcome_w2p():
|
||||
if not os.path.exists('welcome.w2p') or os.path.exists('NEWINSTALL'):
|
||||
is_newinstall_file = os.path.exists('NEWINSTALL')
|
||||
if not os.path.exists('welcome.w2p') or is_newinstall_file:
|
||||
try:
|
||||
w2p_pack('welcome.w2p', 'applications/welcome')
|
||||
os.unlink('NEWINSTALL')
|
||||
logging.info("New installation: created welcome.w2p file")
|
||||
except:
|
||||
logging.error("New installation error: unable to create welcome.w2p file")
|
||||
return
|
||||
if is_newinstall_file:
|
||||
try:
|
||||
os.unlink('NEWINSTALL')
|
||||
logging.info("New installation: removed NEWINSTALL file")
|
||||
except:
|
||||
logging.error("New installation error: unable to remove NEWINSTALL file")
|
||||
|
||||
|
||||
def w2p_unpack(filename, path, delete_tar=True):
|
||||
|
||||
Reference in New Issue
Block a user