Small pep8 related typo fixes
This commit is contained in:
parent
8f488eb6bc
commit
cdae6f04e9
@ -110,7 +110,7 @@ class Application(object):
|
|||||||
# pylint: disable=E0202
|
# pylint: disable=E0202
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def headers_log(environ):
|
def headers_log(environ):
|
||||||
"""Remove environment variables from the headers for logging purpose."""
|
"""Remove environment variables from the headers for logging."""
|
||||||
request_environ = dict(environ)
|
request_environ = dict(environ)
|
||||||
for shell_variable in os.environ:
|
for shell_variable in os.environ:
|
||||||
del request_environ[shell_variable]
|
del request_environ[shell_variable]
|
||||||
@ -315,7 +315,8 @@ class Application(object):
|
|||||||
def move(self, environ, calendars, content, user):
|
def move(self, environ, calendars, content, user):
|
||||||
"""Manage MOVE request."""
|
"""Manage MOVE request."""
|
||||||
from_calendar = calendars[0]
|
from_calendar = calendars[0]
|
||||||
from_name = xmlutils.name_from_path(environ["PATH_INFO"], from_calendar)
|
from_name = xmlutils.name_from_path(
|
||||||
|
environ["PATH_INFO"], from_calendar)
|
||||||
if from_name:
|
if from_name:
|
||||||
item = from_calendar.get_item(from_name)
|
item = from_calendar.get_item(from_name)
|
||||||
if item:
|
if item:
|
||||||
@ -337,7 +338,6 @@ class Application(object):
|
|||||||
# Moving calendars, not supported
|
# Moving calendars, not supported
|
||||||
return client.FORBIDDEN, {}, None
|
return client.FORBIDDEN, {}, None
|
||||||
|
|
||||||
|
|
||||||
def options(self, environ, calendars, content, user):
|
def options(self, environ, calendars, content, user):
|
||||||
"""Manage OPTIONS request."""
|
"""Manage OPTIONS request."""
|
||||||
headers = {
|
headers = {
|
||||||
|
@ -47,7 +47,8 @@ def has_right(owner, user, password):
|
|||||||
CONNEXION.simple_bind_s(BINDDN, PASSWORD)
|
CONNEXION.simple_bind_s(BINDDN, PASSWORD)
|
||||||
|
|
||||||
distinguished_name = "%s=%s" % (ATTRIBUTE, ldap.dn.escape_dn_chars(user))
|
distinguished_name = "%s=%s" % (ATTRIBUTE, ldap.dn.escape_dn_chars(user))
|
||||||
log.LOGGER.debug("LDAP bind for %s in base %s" % (distinguished_name, BASE))
|
log.LOGGER.debug(
|
||||||
|
"LDAP bind for %s in base %s" % (distinguished_name, BASE))
|
||||||
|
|
||||||
users = CONNEXION.search_s(BASE, ldap.SCOPE_ONELEVEL, distinguished_name)
|
users = CONNEXION.search_s(BASE, ldap.SCOPE_ONELEVEL, distinguished_name)
|
||||||
if users:
|
if users:
|
||||||
|
@ -35,9 +35,9 @@ from radicale import config
|
|||||||
LOGGER = logging.getLogger()
|
LOGGER = logging.getLogger()
|
||||||
FILENAME = os.path.expanduser(config.get("logging", "config"))
|
FILENAME = os.path.expanduser(config.get("logging", "config"))
|
||||||
|
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
"""Start the logging according to the configuration."""
|
"""Start the logging according to the configuration."""
|
||||||
|
|
||||||
if os.path.exists(FILENAME):
|
if os.path.exists(FILENAME):
|
||||||
# Configuration taken from file
|
# Configuration taken from file
|
||||||
logging.config.fileConfig(FILENAME)
|
logging.config.fileConfig(FILENAME)
|
||||||
|
Loading…
Reference in New Issue
Block a user