transfer: do not crash with an incorrect amount value (closes #888)
This commit is contained in:
parent
15b5bedffd
commit
5b1260b7da
1 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from decimal import Decimal
|
||||
from decimal import Decimal, InvalidOperation
|
||||
import sys
|
||||
|
||||
from weboob.capabilities.base import empty
|
||||
|
|
@ -270,7 +270,7 @@ class Boobank(ReplApplication):
|
|||
|
||||
try:
|
||||
amount = Decimal(amount)
|
||||
except (TypeError, ValueError):
|
||||
except (TypeError, ValueError, InvalidOperation):
|
||||
print >>sys.stderr, 'Error: please give a decimal amount to transfer'
|
||||
return 2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue