added exception catch to nextcloud importer

to handle empty folders in sync
This commit is contained in:
vabene1111
2022-01-17 17:00:08 +01:00
parent edd47873f7
commit e0b8d6fcc3

View File

@ -29,7 +29,11 @@ class Nextcloud(Provider):
client = Nextcloud.get_client(monitor.storage)
files = client.list(monitor.path)
files.pop(0) # remove first element because its the folder itself
try:
files.pop(0) # remove first element because its the folder itself
except IndexError:
pass # folder is emtpy, no recipes will be imported
import_count = 0
for file in files: