]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
use new anonymize style for the public _anonymize as well
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 23 Dec 2008 19:16:01 +0000 (19:16 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 23 Dec 2008 19:16:01 +0000 (19:16 +0000)
lib/sqlalchemy/sql/compiler.py

index c6eac52a984109b20085f3a9bfa36fa641147d74..5b62e1db6d55891ba7ad5f6fefad55f607a52ef5 100644 (file)
@@ -424,7 +424,7 @@ class DefaultCompiler(engine.Compiled):
         return truncname
     
     def _anonymize(self, name):
-        return name % self.anon_map
+        return self._trunc_re.sub(lambda m: self.anon_map[m.group(1)], name)
         
     def _process_anon(self, key):
         (ident, derived) = key.split(' ')