On second thought, let's move os.name to gameconf.
This commit is contained in:
parent
8cc9abfa94
commit
e6d7c51771
1 changed files with 2 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
from apps.config.models import ConfigValue
|
from apps.config.models import ConfigValue
|
||||||
import os
|
import os
|
||||||
import settings
|
|
||||||
"""
|
"""
|
||||||
Handle the setting/retrieving of server config directives.
|
Handle the setting/retrieving of server config directives.
|
||||||
"""
|
"""
|
||||||
|
|
@ -9,7 +8,7 @@ def host_os_is(osname):
|
||||||
"""
|
"""
|
||||||
Check to see if the host OS matches the query.
|
Check to see if the host OS matches the query.
|
||||||
"""
|
"""
|
||||||
if settings.OS_TYPE == osname:
|
if os.name == osname:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
@ -25,4 +24,4 @@ def set_configvalue(configname, newvalue):
|
||||||
"""
|
"""
|
||||||
conf = ConfigValue.objects.get(conf_key=configname)
|
conf = ConfigValue.objects.get(conf_key=configname)
|
||||||
conf.conf_value = newvalue
|
conf.conf_value = newvalue
|
||||||
conf.save()
|
conf.save()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue