Begun conversion of server/ directory to google style docstrings as per #709.
This commit is contained in:
parent
86a1cf5a13
commit
abff559a61
2 changed files with 12 additions and 1 deletions
|
|
@ -8,7 +8,10 @@ from evennia.server.models import ServerConfig
|
||||||
|
|
||||||
|
|
||||||
class ServerConfigAdmin(admin.ModelAdmin):
|
class ServerConfigAdmin(admin.ModelAdmin):
|
||||||
"Custom admin for server configs"
|
"""
|
||||||
|
Custom admin for server configs
|
||||||
|
|
||||||
|
"""
|
||||||
list_display = ('db_key', 'db_value')
|
list_display = ('db_key', 'db_value')
|
||||||
list_display_links = ('db_key',)
|
list_display_links = ('db_key',)
|
||||||
ordering = ['db_key', 'db_value']
|
ordering = ['db_key', 'db_value']
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,14 @@ _MSGBUFFER = defaultdict(list)
|
||||||
def get_restart_mode(restart_file):
|
def get_restart_mode(restart_file):
|
||||||
"""
|
"""
|
||||||
Parse the server/portal restart status
|
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):
|
if os.path.exists(restart_file):
|
||||||
flag = open(restart_file, 'r').read()
|
flag = open(restart_file, 'r').read()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue