]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Make monkeypatching respect order.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Thu, 19 May 2011 17:17:03 +0000 (10:17 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Thu, 19 May 2011 17:17:03 +0000 (10:17 -0700)
orchestra/monkey.py

index 11da494c38a9ca69bea849bfd331babea7b9d2c2..ffc0cab79942a1d408c5cd471009bf511a76190a 100644 (file)
@@ -1,4 +1,4 @@
-def patch_paramiko_pkey():
+def patch_100_paramiko_pkey():
     """
     Make paramiko recognize AES-encrypted SSH private keys.
 
@@ -10,7 +10,7 @@ def patch_paramiko_pkey():
     paramiko.pkey.PKey._CIPHER_TABLE['AES-128-CBC'] = { 'cipher': Crypto.Cipher.AES, 'keysize': 16, 'blocksize': 16, 'mode': Crypto.Cipher.AES.MODE_CBC }
 
 
-def patch_logger_getChild():
+def patch_100_logger_getChild():
     """
     Imitate Python 2.7 feature Logger.getChild.
     """
@@ -26,5 +26,6 @@ def patch_all():
     Run all the patch_* functions in this module.
     """
     monkeys = [(k,v) for (k,v) in globals().iteritems() if k.startswith('patch_') and k != 'patch_all']
+    monkeys.sort()
     for k,v in monkeys:
         v()