forked from mirrors/autodoist
Trap problems using the Todoist API
parent
2564f972d8
commit
97bd4f7fb4
|
@ -84,7 +84,11 @@ def main():
|
||||||
|
|
||||||
# Main loop
|
# Main loop
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
api.sync(resource_types=['projects', 'labels', 'items'])
|
api.sync(resource_types=['projects', 'labels', 'items'])
|
||||||
|
except Exception as e:
|
||||||
|
logging.exception('Error trying to sync with Todoist API: %s' % str(e))
|
||||||
|
else:
|
||||||
for project in api.projects.all():
|
for project in api.projects.all():
|
||||||
project_type = get_project_type(project)
|
project_type = get_project_type(project)
|
||||||
if project_type:
|
if project_type:
|
||||||
|
|
Loading…
Reference in New Issue