chiark / gitweb /
catacomb/__init__.py: Trim `/' from identifiers names.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 26 May 2015 15:03:11 +0000 (16:03 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 26 May 2015 15:04:46 +0000 (16:04 +0100)
catacomb/__init__.py

index b50c99aa11c8b94a588bacd69989eb16572f0340..120ef111d967e3bc368daf9584a1ff7b285b06fd 100644 (file)
@@ -56,9 +56,9 @@ def _init():
         setattr(c, j[plen:], classmethod(b[j]))
   for i in [gcciphers, gchashes, gcmacs, gcprps]:
     for c in i.itervalues():
-      d[c.name.replace('-', '_')] = c
+      d[c.name.replace('-', '_').translate(None, '/')] = c
   for c in gccrands.itervalues():
-    d[c.name.replace('-', '_') + 'rand'] = c
+    d[c.name.replace('-', '_').translate(None, '/') + 'rand'] = c
 _init()
 
 ## A handy function for our work: add the methods of a named class to an