mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-15 20:36:55 +00:00
Export: Fix paths in log messages
This commit is contained in:
parent
c964910348
commit
8770972e3d
1 changed files with 5 additions and 6 deletions
|
@ -49,7 +49,7 @@ def export_storage(config, path, debug=False):
|
||||||
from . import ical, pathutils, storage
|
from . import ical, pathutils, storage
|
||||||
storage.load()
|
storage.load()
|
||||||
|
|
||||||
print("INFO: Exporting storage for Radicale 2.0.0 to '%s'" % path)
|
print("INFO: Exporting storage for Radicale 2.0.0 to %r" % path)
|
||||||
|
|
||||||
temp = tempfile.mkdtemp(prefix="Radicale.export.")
|
temp = tempfile.mkdtemp(prefix="Radicale.export.")
|
||||||
try:
|
try:
|
||||||
|
@ -58,8 +58,7 @@ def export_storage(config, path, debug=False):
|
||||||
remaining_collections = list(
|
remaining_collections = list(
|
||||||
ical.Collection.from_path("/", depth="0"))
|
ical.Collection.from_path("/", depth="0"))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("ERROR: Failed to find child collections of %r: %s" %
|
print("ERROR: Failed to find collection %r: %s" % ("/", e))
|
||||||
("/", e))
|
|
||||||
if debug:
|
if debug:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -85,7 +84,7 @@ def export_storage(config, path, debug=False):
|
||||||
collection.path))
|
collection.path))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("ERROR: Failed to find child collections of %r: %s" %
|
print("ERROR: Failed to find child collections of %r: %s" %
|
||||||
("/", e))
|
("/" + collection.path, e))
|
||||||
if debug:
|
if debug:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -103,9 +102,9 @@ def export_storage(config, path, debug=False):
|
||||||
try:
|
try:
|
||||||
if not pathutils.is_safe_filesystem_path_component(
|
if not pathutils.is_safe_filesystem_path_component(
|
||||||
component.name):
|
component.name):
|
||||||
print("WARNING: Skipping unsafe item '%s' from "
|
print("WARNING: Skipping unsafe item %r from "
|
||||||
"collection %r" %
|
"collection %r" %
|
||||||
("/" + component.name, collection.path))
|
(component.name, "/" + collection.path))
|
||||||
continue
|
continue
|
||||||
items = [component]
|
items = [component]
|
||||||
if collection.resource_type == "calendar":
|
if collection.resource_type == "calendar":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue