auto_backup
auto_backup copied to clipboard
pysftp: verbose exception (enum dependency)
The pysftp depends on enum, so when enum is not installed, we will see error pysftp is needed instead of the actual error of missing enum.
I got it couple of times.
So may be we can update and show the actual exception message: https://github.com/Yenthe666/auto_backup/blob/10.0/auto_backup/models/db_backup.py#L38
may be something like:
except ImportError as ie:
raise ImportError('pysftp not installed, please.....'+str(ie))
Thanks for the nice module !! :+1:
Hmm maybe I can just add the str(ie)
at the end of the sentence though? Like
"This module needs pysftp to automaticly write backups to the FTP through SFTP. Please install pysftp on your system. (sudo pip install pysftp)'). Traceback: %s" % str(ie)
?
Yeah, Or we can also be more explicit and let user know like "Failed to import pysftp, This module needs pysftp to.... " and then str(ie)
:+1:
@dek-odoo , are you saying that there is a way of installing pysftp
without having its dependency enum
also installed? Or am I misreading something here?