# HG changeset patch # User John Rouillard # Date 1586013726 14400 # Node ID e7cb0147e6fe1b2286d8efb0f6cbe2e72c6affd8 # Parent 2168da32403d87f49415a8aa26bc9b1977ecfa91 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.... diff -r 2168da32403d -r e7cb0147e6fe roundup/backends/rdbms_common.py --- 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) diff -r 2168da32403d -r e7cb0147e6fe roundup/scripts/roundup_server.py --- a/roundup/scripts/roundup_server.py Fri Apr 03 22:38:03 2020 -0400 +++ b/roundup/scripts/roundup_server.py Sat Apr 04 11:22:06 2020 -0400 @@ -499,7 +499,8 @@ def error(): exc_type, exc_value = sys.exc_info()[:2] - return _('Error: %s: %s' % (exc_type, exc_value)) + return _('Error: %(type)s: %(value)s' % {'type': exc_type, + 'value': exc_value}) def setgid(group):