Don't filter underscores from slice names
authorAndy Bavier <acb@acb-imac.cs.princeton.edu>
Fri, 25 Mar 2011 20:12:05 +0000 (16:12 -0400)
committerAndy Bavier <acb@acb-imac.cs.princeton.edu>
Fri, 25 Mar 2011 20:12:05 +0000 (16:12 -0400)
Underscore is a legal character in slice names.  Filtering them causes problems importing these slices into the SFA.

sfa/util/plxrn.py

index e538902..7049df6 100644 (file)
@@ -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):