mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-01 18:18:31 +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)
|
||||
while remaining_collections:
|
||||
collection = remaining_collections.pop(0)
|
||||
if debug:
|
||||
print("DEBUG: Exporting collection %r" %
|
||||
("/" + collection.path))
|
||||
try:
|
||||
try:
|
||||
filesystem_path = pathutils.path_to_filesystem(
|
||||
|
@ -94,6 +97,9 @@ def export_storage(config, path, debug=False):
|
|||
with open(props_filename, "w") as f:
|
||||
json.dump(props, f)
|
||||
for component in collection.components:
|
||||
if debug:
|
||||
print("DEBUG: Exporting component %r of collection %r"
|
||||
% (component.name, "/" + collection.path))
|
||||
try:
|
||||
if not pathutils.is_safe_filesystem_path_component(
|
||||
component.name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue