Skip to content

Commit 9440d1c

Browse files
committed
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....
1 parent 21dc8fb commit 9440d1c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

roundup/backends/rdbms_common.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,9 @@ def update_class(self, spec, old_spec, force=0):
545545
return 0
546546

547547
if not self.config.RDBMS_ALLOW_ALTER:
548-
raise DatabaseError(_('ALTER operation disallowed: %r -> %r.'% (
549-
old_spec, new_spec)))
548+
raise DatabaseError(_(
549+
'ALTER operation disallowed: %(old)r -> %(new)r.'% {
550+
'old': old_spec, 'new': new_spec}))
550551

551552
logger = logging.getLogger('roundup.hyperdb.backend')
552553
logger.info('update_class %s' % spec.classname)

roundup/scripts/roundup_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ def start_response(self, headers, response):
499499

500500
def error():
501501
exc_type, exc_value = sys.exc_info()[:2]
502-
return _('Error: %s: %s' % (exc_type, exc_value))
502+
return _('Error: %(type)s: %(value)s' % {'type': exc_type,
503+
'value': exc_value})
503504

504505

505506
def setgid(group):

0 commit comments

Comments
 (0)