Merge from Kelketek clone.

This commit is contained in:
Griatch 2013-06-03 16:28:38 +02:00
commit 31410f5710
2 changed files with 3 additions and 27 deletions

View file

@ -106,29 +106,6 @@ def get_pid(pidfile):
pid = f.read() pid = f.read()
return pid return pid
def cycle_logfile(logfile):
"""
Move the old log files to <filename>.old
"""
logfile_old = logfile + '.old'
if os.path.exists(logfile):
# Cycle the old logfiles to *.old
if os.path.exists(logfile_old):
# E.g. Windows don't support rename-replace
os.remove(logfile_old)
os.rename(logfile, logfile_old)
logfile = settings.HTTP_LOG_FILE.strip()
logfile_old = logfile + '.old'
if os.path.exists(logfile):
# Cycle the old logfiles to *.old
if os.path.exists(logfile_old):
# E.g. Windows don't support rename-replace
os.remove(logfile_old)
os.rename(logfile, logfile_old)
# Start program management # Start program management
SERVER = None SERVER = None
@ -268,7 +245,6 @@ def main():
del server_argv[2] del server_argv[2]
print "\nStarting Evennia Server (output to stdout)." print "\nStarting Evennia Server (output to stdout)."
else: else:
cycle_logfile(SERVER_LOGFILE)
print "\nStarting Evennia Server (output to server logfile)." print "\nStarting Evennia Server (output to server logfile)."
if options.sprof: if options.sprof:
server_argv.extend(sprof_argv) server_argv.extend(sprof_argv)
@ -290,7 +266,7 @@ def main():
set_restart_mode(PORTAL_RESTART, True) set_restart_mode(PORTAL_RESTART, True)
print "\nStarting Evennia Portal in non-Daemon mode (output to stdout)." print "\nStarting Evennia Portal in non-Daemon mode (output to stdout)."
else: else:
cycle_logfile(PORTAL_LOGFILE) PORTAL_LOGFILE
set_restart_mode(PORTAL_RESTART, False) set_restart_mode(PORTAL_RESTART, False)
print "\nStarting Evennia Portal in Daemon mode (output to portal logfile)." print "\nStarting Evennia Portal in Daemon mode (output to portal logfile)."
if options.pprof: if options.pprof:

View file

@ -42,7 +42,7 @@ def find_channel(caller, channelname, silent=False, noaliases=False):
return None return None
return channels[0] return channels[0]
class CmdAddCom(MuxCommand): class CmdAddCom(MuxPlayerCommand):
""" """
addcom - subscribe to a channel with optional alias addcom - subscribe to a channel with optional alias
@ -111,7 +111,7 @@ class CmdAddCom(MuxCommand):
self.msg(string) self.msg(string)
class CmdDelCom(MuxCommand): class CmdDelCom(MuxPlayerCommand):
""" """
delcom - unsubscribe from channel or remove channel alias delcom - unsubscribe from channel or remove channel alias