mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-25 19:30:54 +00:00
Fix owner_* rights with python2 (fix #49)
This commit is contained in:
parent
f7f26afd6b
commit
07a9ce8296
1 changed files with 2 additions and 1 deletions
|
@ -24,6 +24,7 @@ Rights management.
|
|||
"""
|
||||
|
||||
import re
|
||||
import io
|
||||
import os.path
|
||||
|
||||
from . import config, log
|
||||
|
@ -50,7 +51,7 @@ def _read_from_sections(user, collection, permission):
|
|||
regex = ConfigParser({"login": user, "path": collection})
|
||||
if TYPE in DEFINED_RIGHTS:
|
||||
log.LOGGER.debug("Rights type '%s'" % TYPE)
|
||||
regex.read_string(DEFINED_RIGHTS[TYPE])
|
||||
regex.readfp(io.BytesIO(DEFINED_RIGHTS[TYPE]))
|
||||
elif TYPE == "from_file":
|
||||
log.LOGGER.debug("Reading rights from file %s" % FILENAME)
|
||||
if not regex.read(FILENAME):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue