#1911 NEWINSTALL file unlink issue

This commit is contained in:
Carlos Cesar Caballero Díaz
2018-04-30 14:17:44 -04:00
parent 0226eb5286
commit f50380af73
+9 -2
View File
@@ -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):