Instead of blowing up when the account name is missing, display a useful error message that gives the correct account names.
This commit is contained in:
parent
0ee7dfd435
commit
c7894a01f0
@ -113,6 +113,14 @@ def startup(versionno):
|
|||||||
|
|
||||||
syncaccounts = {}
|
syncaccounts = {}
|
||||||
for account in activeaccounts:
|
for account in activeaccounts:
|
||||||
|
if account not in allaccounts:
|
||||||
|
if len(allaccounts) == 0:
|
||||||
|
errormsg = 'The account "%s" does not exist because no accounts are defined!'%account
|
||||||
|
else:
|
||||||
|
errormsg = 'The account "%s" does not exist. Valid accounts are:'%account
|
||||||
|
for name in allaccounts.keys():
|
||||||
|
errormsg += '\n%s'%name
|
||||||
|
ui.terminate(1, errortitle = 'Unknown Account "%s"'%account, errormsg = errormsg)
|
||||||
syncaccounts[account] = allaccounts[account]
|
syncaccounts[account] = allaccounts[account]
|
||||||
|
|
||||||
server = None
|
server = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user