Increase compatibility
This commit is contained in:
parent
95a856ef73
commit
30a0d9a892
1 changed files with 2 additions and 2 deletions
|
@ -121,14 +121,14 @@ with triad.client.Session.start(args.url, args.username, args.password) as sessi
|
||||||
try:
|
try:
|
||||||
monthly_fee = decimal.Decimal(member['monthly_fee'])
|
monthly_fee = decimal.Decimal(member['monthly_fee'])
|
||||||
except:
|
except:
|
||||||
print(f"\tInvalid monthly fee: {member['monthly_fee']}", file=sys.stderr)
|
print(f"\tInvalid monthly fee: {member.get('monthly_fee')}", file=sys.stderr)
|
||||||
monthly_fee = None
|
monthly_fee = None
|
||||||
else:
|
else:
|
||||||
print(f"\tMonthly fee: {monthly_fee}", file=sys.stderr)
|
print(f"\tMonthly fee: {monthly_fee}", file=sys.stderr)
|
||||||
try:
|
try:
|
||||||
yearly_fee = decimal.Decimal(member['yearly_fee'])
|
yearly_fee = decimal.Decimal(member['yearly_fee'])
|
||||||
except:
|
except:
|
||||||
print(f'\tInvalid yearly fee: {member['yearly_fee']}', file=sys.stderr)
|
print(f'\tInvalid yearly fee: {member.get("yearly_fee")}', file=sys.stderr)
|
||||||
yearly_fee = None
|
yearly_fee = None
|
||||||
else:
|
else:
|
||||||
print(f'\tYearly fee: {yearly_fee}', file=sys.stderr)
|
print(f'\tYearly fee: {yearly_fee}', file=sys.stderr)
|
||||||
|
|
Loading…
Reference in a new issue