Mercurial > p > roundup > code
diff roundup/backends/rdbms_common.py @ 6133:e7cb0147e6fe
Make format strings use named placeholders rather than %s/%r
Fixing some issues reported while updating roundup.pot to prep for
2.0.0 beta releases. Still more to do but....
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 04 Apr 2020 11:22:06 -0400 |
| parents | e6073c2291c6 |
| children | 8497bf3f23a1 |
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py Fri Apr 03 22:38:03 2020 -0400 +++ b/roundup/backends/rdbms_common.py Sat Apr 04 11:22:06 2020 -0400 @@ -545,8 +545,9 @@ return 0 if not self.config.RDBMS_ALLOW_ALTER: - raise DatabaseError(_('ALTER operation disallowed: %r -> %r.'% ( - old_spec, new_spec))) + raise DatabaseError(_( + 'ALTER operation disallowed: %(old)r -> %(new)r.'% { + 'old': old_spec, 'new': new_spec})) logger = logging.getLogger('roundup.hyperdb.backend') logger.info('update_class %s' % spec.classname)
