Run "futurize -1 -w -n ."

This commit is contained in:
Russell Jones 2015-10-01 20:00:28 +01:00
parent 7f11256fc8
commit 06c3dc0ed3
55 changed files with 281 additions and 244 deletions

View file

@ -7,6 +7,7 @@ sets up all the networking features. (this is done automatically
by game/evennia.py).
"""
from __future__ import print_function
import time
import sys
import os
@ -211,7 +212,7 @@ class Evennia(object):
#from evennia.players.models import PlayerDB
for i, prev, curr in ((i, tup[0], tup[1]) for i, tup in enumerate(settings_compare) if i in mismatches):
# update the database
print " %s:\n '%s' changed to '%s'. Updating unchanged entries in database ..." % (settings_names[i], prev, curr)
print(" %s:\n '%s' changed to '%s'. Updating unchanged entries in database ..." % (settings_names[i], prev, curr))
if i == 0:
ObjectDB.objects.filter(db_cmdset_storage__exact=prev).update(db_cmdset_storage=curr)
if i == 1:
@ -245,18 +246,18 @@ class Evennia(object):
if not last_initial_setup_step:
# None is only returned if the config does not exist,
# i.e. this is an empty DB that needs populating.
print ' Server started for the first time. Setting defaults.'
print(' Server started for the first time. Setting defaults.')
initial_setup.handle_setup(0)
print '-' * 50
print('-' * 50)
elif int(last_initial_setup_step) >= 0:
# a positive value means the setup crashed on one of its
# modules and setup will resume from this step, retrying
# the last failed module. When all are finished, the step
# is set to -1 to show it does not need to be run again.
print ' Resuming initial setup from step %(last)s.' % \
{'last': last_initial_setup_step}
print(' Resuming initial setup from step %(last)s.' % \
{'last': last_initial_setup_step})
initial_setup.handle_setup(int(last_initial_setup_step))
print '-' * 50
print('-' * 50)
def run_init_hooks(self):
"""
@ -463,8 +464,8 @@ application = service.Application('Evennia')
# and is where we store all the other services.
EVENNIA = Evennia(application)
print '-' * 50
print ' %(servername)s Server (%(version)s) started.' % {'servername': SERVERNAME, 'version': VERSION}
print('-' * 50)
print(' %(servername)s Server (%(version)s) started.' % {'servername': SERVERNAME, 'version': VERSION})
if AMP_ENABLED:
@ -475,7 +476,7 @@ if AMP_ENABLED:
ifacestr = ""
if AMP_INTERFACE != '127.0.0.1':
ifacestr = "-%s" % AMP_INTERFACE
print ' amp (to Portal)%s: %s' % (ifacestr, AMP_PORT)
print(' amp (to Portal)%s: %s' % (ifacestr, AMP_PORT))
from evennia.server import amp
@ -508,7 +509,7 @@ if WEBSERVER_ENABLED:
webserver.setName('EvenniaWebServer%s' % serverport)
EVENNIA.services.addService(webserver)
print " webserver: %s" % serverport
print(" webserver: %s" % serverport)
ENABLED = []
if IRC_ENABLED:
@ -524,13 +525,13 @@ if RSS_ENABLED:
ENABLED.append('rss')
if ENABLED:
print " " + ", ".join(ENABLED) + " enabled."
print(" " + ", ".join(ENABLED) + " enabled.")
for plugin_module in SERVER_SERVICES_PLUGIN_MODULES:
# external plugin protocols
plugin_module.start_plugin_services(EVENNIA)
print '-' * 50 # end of terminal output
print('-' * 50) # end of terminal output
# clear server startup mode
ServerConfig.objects.conf("server_starting_mode", delete=True)