[admin identities] convert identity.id to string before passing it to urllib.quote

This commit is contained in:
Benjamin Dauvergne 2010-12-09 15:05:12 +00:00
parent e422c8a9fa
commit 48ab5c055e
3 changed files with 4 additions and 4 deletions

View File

@ -272,7 +272,7 @@ class IdentitiesDirectory(Directory):
nb_federations, _('federations'))
'</p>'
'<p class="commands">'
command_icon('%s/' % urllib.quote(identity.id), 'view')
command_icon('%s/' % urllib.quote(str(identity.id)), 'view')
command_icon('%s/edit' % identity.id, 'edit')
if not getattr(store, str('ldap_read_only'), False):
if hasattr(identities.get_store(), str('remove')):

View File

@ -93,13 +93,13 @@ class LibertyProvidersDir(Directory):
'<li>'
'<strong>%s (%s)</strong>' % (_('Broken'), klp)
'<p class="commands">'
klp = urllib.quote(klp)
klp = urllib.quote(str(klp))
command_icon('%s/delete' % klp, 'remove')
'</p>'
'</li>'
continue
klp = urllib.quote(klp)
klp = urllib.quote(str(klp))
'<li>'
'<strong>%s</strong>' % htmltext(label)
'<p class="details"><span class="data">%s</span></p>' % p.providerId # XXX: tell sp/idp

View File

@ -78,7 +78,7 @@ def test_pgt_url(pgt_url, pgt_id, pgt_iou):
else:
prefix = '?'
url = '%s%s%s=%s&%s=%s' % (url, prefix, _pgt_id_param,
urllib.quote(pgt_id), _pgt_id_iou, urllib.quote(pgt_iou))
urllib.quote(str(pgt_id)), _pgt_id_iou, urllib.quote(str(pgt_iou)))
handle = urlopen(url)
handle.readlines()
handle.close()