Exception does not work with %s
This commit is contained in:
parent
02fc05aebd
commit
8776ab1ff8
1 changed files with 4 additions and 3 deletions
|
@ -362,7 +362,8 @@ class Ledger(Storage):
|
||||||
break
|
break
|
||||||
|
|
||||||
if not semantic_lines['id_location']:
|
if not semantic_lines['id_location']:
|
||||||
raise TransactionNotFound('No transaction with ID "%s" found')
|
raise TransactionNotFound(
|
||||||
|
'No transaction with ID "{0}" found'.format(transaction_id))
|
||||||
|
|
||||||
transaction_start_pattern = re.compile(r'^\S')
|
transaction_start_pattern = re.compile(r'^\S')
|
||||||
|
|
||||||
|
@ -422,8 +423,8 @@ class Ledger(Storage):
|
||||||
:data:`transaction` to the database.
|
:data:`transaction` to the database.
|
||||||
'''
|
'''
|
||||||
if not transaction.id:
|
if not transaction.id:
|
||||||
return AccountingException('The transaction %s has no'
|
return AccountingException(('The transaction {0} has no'
|
||||||
' id attribute', transaction)
|
' id attribute').format(transaction))
|
||||||
|
|
||||||
old_transaction = self.get_transaction(transaction.id)
|
old_transaction = self.get_transaction(transaction.id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue