Changeset e982b92 for fedd/federation


Ignore:
Timestamp:
Sep 21, 2011 1:57:55 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
ad3d8df
Parents:
de2ef5c
Message:

swig doesn't understand unicode strings. Make sure that attributes are
pure strings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/authorizer.py

    rde2ef5c re982b92  
    293293    @staticmethod
    294294    def clean_attr(attr):
     295        '''
     296        Convert anything not in A-Z_ into an _ and make sure that the string
     297        begins with a non-_.  Convert to s string to keep swig happy.
     298        '''
    295299        a = abac_authorizer.clean_attr_re.sub('_', attr)
    296         return abac_authorizer.clean_prefix_attr_re.sub('', a)
     300        return str(abac_authorizer.clean_prefix_attr_re.sub('', a))
    297301
    298302
     
    339343                    attrcert.bake()
    340344                except:
    341                     raise abac_authorized_bad_cert_error(
     345                    raise abac_authorizer.bad_cert_error(
    342346                            "Cannot create attribute cert")
    343347                self.lock.acquire()
Note: See TracChangeset for help on using the changeset viewer.