Begun conversion of server/ directory to google style docstrings as per #709.

This commit is contained in:
Griatch 2015-06-22 08:45:35 +02:00
parent 86a1cf5a13
commit abff559a61
2 changed files with 12 additions and 1 deletions

View file

@ -8,7 +8,10 @@ from evennia.server.models import ServerConfig
class ServerConfigAdmin(admin.ModelAdmin):
"Custom admin for server configs"
"""
Custom admin for server configs
"""
list_display = ('db_key', 'db_value')
list_display_links = ('db_key',)
ordering = ['db_key', 'db_value']

View file

@ -53,6 +53,14 @@ _MSGBUFFER = defaultdict(list)
def get_restart_mode(restart_file):
"""
Parse the server/portal restart status
Args:
restart_file (str): Path to restart.dat file.
Returns:
restart_mode (bool): If the file indicates the server is in
restart mode or not.
"""
if os.path.exists(restart_file):
flag = open(restart_file, 'r').read()