diff options
| author | Scott Gasch <[email protected]> | 2021-07-29 09:11:05 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2021-07-29 09:11:05 -0700 |
| commit | a08ca309cb5bd7971210a9247a38c9bbe376a6e6 (patch) | |
| tree | 879e0ee5403d5ede0658db5ed6e4705c86208f9c /type | |
| parent | 4faa994d32223c8d560d9dad0ca90a3f7eb10d6a (diff) | |
Lockfile custom command, fixup minor things.
Diffstat (limited to 'type')
| -rw-r--r-- | type/centcount.py | 2 | ||||
| -rw-r--r-- | type/money.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/type/centcount.py b/type/centcount.py index 4181721..ce18975 100644 --- a/type/centcount.py +++ b/type/centcount.py @@ -210,7 +210,7 @@ class CentCount(object): centcount = int(float(chunk) * 100.0) elif CentCount.CURRENCY_RE.match(chunk) is not None: currency = chunk - except: + except Exception: pass if centcount is not None and currency is not None: return (centcount, currency) diff --git a/type/money.py b/type/money.py index c77a938..290c2c8 100644 --- a/type/money.py +++ b/type/money.py @@ -17,7 +17,7 @@ class Money(object): def __init__ ( self, - amount: Decimal = Decimal("0.0"), + amount: Decimal = Decimal("0"), currency: str = 'USD', *, strict_mode = False @@ -211,7 +211,7 @@ class Money(object): amount = Decimal(chunk) elif Money.CURRENCY_RE.match(chunk) is not None: currency = chunk - except: + except Exception: pass if amount is not None and currency is not None: return (amount, currency) |
