We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
parser.error()
1 parent 13d23b4 commit fec7af9Copy full SHA for fec7af9
userland/utilities/seq.py
@@ -1,5 +1,4 @@
1
import math
2
-import sys
3
from decimal import Decimal, InvalidOperation
4
5
from .. import core
@@ -45,12 +44,9 @@ def python_userland_seq(opts, args):
45
44
46
def arg_to_decimal(arg: str) -> Decimal:
47
try:
48
- return Decimal(
49
- arg,
50
- )
+ return Decimal(arg)
51
except InvalidOperation:
52
- print(f"invalid decimal argument: {arg}", file=sys.stderr)
53
- sys.exit(1)
+ parser.error(f"invalid decimal argument: {arg}")
54
55
if len(args) == 1:
56
first = Decimal(1)
0 commit comments