mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-04 18:22:26 +00:00
Export: Print collections and components if debugging is enabled
This commit is contained in:
parent
4a0964529f
commit
d069be5189
1 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,9 @@ def export_storage(config, path, debug=False):
|
||||||
exit(1)
|
exit(1)
|
||||||
while remaining_collections:
|
while remaining_collections:
|
||||||
collection = remaining_collections.pop(0)
|
collection = remaining_collections.pop(0)
|
||||||
|
if debug:
|
||||||
|
print("DEBUG: Exporting collection %r" %
|
||||||
|
("/" + collection.path))
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
filesystem_path = pathutils.path_to_filesystem(
|
filesystem_path = pathutils.path_to_filesystem(
|
||||||
|
@ -94,6 +97,9 @@ def export_storage(config, path, debug=False):
|
||||||
with open(props_filename, "w") as f:
|
with open(props_filename, "w") as f:
|
||||||
json.dump(props, f)
|
json.dump(props, f)
|
||||||
for component in collection.components:
|
for component in collection.components:
|
||||||
|
if debug:
|
||||||
|
print("DEBUG: Exporting component %r of collection %r"
|
||||||
|
% (component.name, "/" + collection.path))
|
||||||
try:
|
try:
|
||||||
if not pathutils.is_safe_filesystem_path_component(
|
if not pathutils.is_safe_filesystem_path_component(
|
||||||
component.name):
|
component.name):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue