fix bug in site_hrn()
[sfa.git] / sfa / util / plxrn.py
index e538902..5580c44 100644 (file)
@@ -23,7 +23,7 @@ class PlXrn (Xrn):
 
     @staticmethod 
     def site_hrn (auth, login_base):
-        return '.'.join(auth,login_base)
+        return '.'.join([auth,login_base])
 
     def __init__ (self, auth=None, hostname=None, slicename=None, email=None, **kwargs):
         #def hostname_to_hrn(auth_hrn, login_base, hostname):
@@ -54,7 +54,7 @@ class PlXrn (Xrn):
     def pl_slicename (self):
         self._normalize()
         leaf = self.leaf
-        leaf = re.sub('[^a-zA-Z0-9]', '', leaf)
+        leaf = re.sub('[^a-zA-Z0-9_]', '', leaf)
         return self.pl_login_base() + '_' + leaf
 
     #def hrn_to_pl_authname(hrn):