Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Apr 28, 2018
1 parent 967ff35 commit 1ebfdd3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/ZServer/ZPublisher/tests/test_xmlrpc.py
@@ -1,8 +1,8 @@
import unittest
import xmlrpclib

from DateTime import DateTime

import unittest
import xmlrpc.client as xmlrpclib


class FauxResponse(object):

Expand Down
17 changes: 9 additions & 8 deletions src/ZServer/ZPublisher/xmlrpc.py
Expand Up @@ -19,18 +19,19 @@
information about XML-RPC and Zope.
"""

from App.config import getConfiguration
# Make DateTime.DateTime marshallable via XML-RPC
# http://www.zope.org/Collectors/Zope/2109
from DateTime.DateTime import DateTime
from zExceptions import Unauthorized
from ZODB.POSException import ConflictError

import re
import sys
import types
import xmlrpclib
import xmlrpc.client as xmlrpclib

from App.config import getConfiguration
from zExceptions import Unauthorized
from ZODB.POSException import ConflictError

# Make DateTime.DateTime marshallable via XML-RPC
# http://www.zope.org/Collectors/Zope/2109
from DateTime.DateTime import DateTime
WRAPPERS = xmlrpclib.WRAPPERS + (DateTime, )


Expand All @@ -50,7 +51,7 @@ def dump_instance(self, value, write):
self.dump_struct(value, write)


xmlrpclib.Marshaller.dispatch[types.InstanceType] = dump_instance
xmlrpclib.Marshaller.dispatch[object] = dump_instance
xmlrpclib.Marshaller.dispatch[DateTime] = dump_instance


Expand Down
4 changes: 2 additions & 2 deletions src/ZServer/utils.py
Expand Up @@ -13,9 +13,9 @@

""" A set of utility routines used by asyncore initialization """

import pkg_resources
import sys

import pkg_resources

_version_string = None

Expand Down Expand Up @@ -71,6 +71,6 @@ def requestCloseOnExec(sock):


def patchSyslogServiceName():
from medusa import logger
from .medusa import logger
# override the service name in logger.syslog_logger
logger.syslog_logger.svc_name = 'ZServer'

0 comments on commit 1ebfdd3

Please sign in to comment.