Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't fail on users without signature(s) #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmelha
Copy link

@dmelha dmelha commented Jul 5, 2019

Signed-off-by: dmelha dmelha@localhost

extra check for type dict added because users without signature(s) can have a list object there.
example output without patch:

python3 webapp_admin.py.unpatched.py --all-users --backup --backup-signature
Creating backup WebApp settings for user kkopanocek
Dumping: 'Neue Signatur' to './kkopanocek_Neue-Signatur_1551091094578.html' 
konferenzraum: Has no or no valid WebApp settings creating empty config tree
Creating backup WebApp settings for user konferenzraum
konferenzraum: Has no or no valid WebApp settings creating empty config tree
user konferenzraum has no signature
Creating backup WebApp settings for user supertest100
Traceback (most recent call last):
  File "webapp_admin.py.unpatched.py", line 584, in <module>
    main()
  File "webapp_admin.py.unpatched.py", line 518, in main
    backup_signature(user, options.location)
  File "webapp_admin.py.unpatched.py", line 217, in backup_signature
    if settings['settings']['zarafa']['v1']['contexts']['mail'].get('signatures'):
AttributeError: 'list' object has no attribute 'get'

Signed-off-by: dmelha <dmelha@localhost>
@dmelha
Copy link
Author

dmelha commented Jul 23, 2019

any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant