mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 02:06:32 +01:00
Continued conversions
This commit is contained in:
parent
7d6a4b44f5
commit
b4cc3d0ac2
4 changed files with 30 additions and 37 deletions
|
|
@ -501,7 +501,7 @@ def _print_info(portal_info_dict, server_info_dict):
|
|||
|
||||
def _prepare_dict(dct):
|
||||
out = {}
|
||||
for key, value in dct.iteritems():
|
||||
for key, value in dct.items():
|
||||
if isinstance(value, list):
|
||||
value = "\n{}".format(ind).join(value)
|
||||
out[key] = value
|
||||
|
|
@ -576,9 +576,9 @@ class MsgStatus(amp.Command):
|
|||
|
||||
"""
|
||||
key = "MsgStatus"
|
||||
arguments = [('status', amp.String())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
response = [('status', amp.String())]
|
||||
arguments = [(b'status', amp.String())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = [(b'status', amp.String())]
|
||||
|
||||
|
||||
class MsgLauncher2Portal(amp.Command):
|
||||
|
|
@ -587,9 +587,9 @@ class MsgLauncher2Portal(amp.Command):
|
|||
|
||||
"""
|
||||
key = "MsgLauncher2Portal"
|
||||
arguments = [('operation', amp.String()),
|
||||
('arguments', amp.String())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
arguments = [(b'operation', amp.String()),
|
||||
(b'arguments', amp.String())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = []
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,15 @@ The AMP (Asynchronous Message Protocol)-communication commands and constants use
|
|||
This module acts as a central place for AMP-servers and -clients to get commands to use.
|
||||
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
from functools import wraps
|
||||
import time
|
||||
from twisted.protocols import amp
|
||||
from collections import defaultdict, namedtuple
|
||||
from cStringIO import StringIO
|
||||
from io import StringIO
|
||||
from itertools import count
|
||||
import zlib # Used in Compressed class
|
||||
try:
|
||||
import cPickle as pickle
|
||||
except ImportError:
|
||||
import pickle
|
||||
import pickle
|
||||
|
||||
from twisted.internet.defer import DeferredList, Deferred
|
||||
from evennia.utils.utils import to_str, variable_from_module
|
||||
|
|
@ -159,9 +156,9 @@ class MsgLauncher2Portal(amp.Command):
|
|||
|
||||
"""
|
||||
key = "MsgLauncher2Portal"
|
||||
arguments = [('operation', amp.String()),
|
||||
('arguments', amp.String())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
arguments = [(b'operation', amp.String()),
|
||||
(b'arguments', amp.String())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = []
|
||||
|
||||
|
||||
|
|
@ -171,8 +168,8 @@ class MsgPortal2Server(amp.Command):
|
|||
|
||||
"""
|
||||
key = "MsgPortal2Server"
|
||||
arguments = [('packed_data', Compressed())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
arguments = [(b'packed_data', Compressed())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = []
|
||||
|
||||
|
||||
|
|
@ -182,8 +179,8 @@ class MsgServer2Portal(amp.Command):
|
|||
|
||||
"""
|
||||
key = "MsgServer2Portal"
|
||||
arguments = [('packed_data', Compressed())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
arguments = [(b'packed_data', Compressed())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = []
|
||||
|
||||
|
||||
|
|
@ -196,8 +193,8 @@ class AdminPortal2Server(amp.Command):
|
|||
|
||||
"""
|
||||
key = "AdminPortal2Server"
|
||||
arguments = [('packed_data', Compressed())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
arguments = [(b'packed_data', Compressed())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = []
|
||||
|
||||
|
||||
|
|
@ -210,8 +207,8 @@ class AdminServer2Portal(amp.Command):
|
|||
|
||||
"""
|
||||
key = "AdminServer2Portal"
|
||||
arguments = [('packed_data', Compressed())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
arguments = [(b'packed_data', Compressed())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = []
|
||||
|
||||
|
||||
|
|
@ -221,9 +218,9 @@ class MsgStatus(amp.Command):
|
|||
|
||||
"""
|
||||
key = "MsgStatus"
|
||||
arguments = [('status', amp.String())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
response = [('status', amp.String())]
|
||||
arguments = [(b'status', amp.String())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = [(b'status', amp.String())]
|
||||
|
||||
|
||||
class FunctionCall(amp.Command):
|
||||
|
|
@ -235,12 +232,12 @@ class FunctionCall(amp.Command):
|
|||
|
||||
"""
|
||||
key = "FunctionCall"
|
||||
arguments = [('module', amp.String()),
|
||||
('function', amp.String()),
|
||||
('args', amp.String()),
|
||||
('kwargs', amp.String())]
|
||||
errors = {Exception: 'EXCEPTION'}
|
||||
response = [('result', amp.String())]
|
||||
arguments = [(b'module', amp.String()),
|
||||
(b'function', amp.String()),
|
||||
(b'args', amp.String()),
|
||||
(b'kwargs', amp.String())]
|
||||
errors = {Exception: b'EXCEPTION'}
|
||||
response = [(b'result', amp.String())]
|
||||
|
||||
|
||||
# -------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ This is a simple context factory for auto-creating
|
|||
SSL keys and certificates.
|
||||
|
||||
"""
|
||||
|
||||
|
||||
import os
|
||||
import sys
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ when starting and will warn if this was not possible. These will appear as files
|
|||
ssl.cert in mygame/server/.
|
||||
|
||||
"""
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
try:
|
||||
from OpenSSL import crypto
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue