Remove the existing log file on startup.
This commit is contained in:
parent
2c5ba50863
commit
5065720da9
11
luminotes.py
11
luminotes.py
|
@ -31,9 +31,6 @@ def change_to_main_dir():
|
||||||
def main( args ):
|
def main( args ):
|
||||||
change_to_main_dir()
|
change_to_main_dir()
|
||||||
|
|
||||||
if sys.platform.startswith( "win" ):
|
|
||||||
sys.stderr = sys.stdout
|
|
||||||
|
|
||||||
cherrypy.config.update( Common.settings )
|
cherrypy.config.update( Common.settings )
|
||||||
|
|
||||||
if args and "-d" in args:
|
if args and "-d" in args:
|
||||||
|
@ -75,7 +72,13 @@ def main( args ):
|
||||||
if launch_browser is True:
|
if launch_browser is True:
|
||||||
webbrowser.open_new( server_url )
|
webbrowser.open_new( server_url )
|
||||||
|
|
||||||
sys.exit( 1 )
|
sys.exit( 0 )
|
||||||
|
|
||||||
|
# remove the existing log file, if any
|
||||||
|
try:
|
||||||
|
os.remove( "luminotes.log" )
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
|
||||||
socket.setdefaulttimeout( SOCKET_TIMEOUT_SECONDS )
|
socket.setdefaulttimeout( SOCKET_TIMEOUT_SECONDS )
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user