# HG changeset patch # User Pascal Volk # Date 1251956032 0 # Node ID ffac064bd728844916e9b5b4061bda9c7372b816 # Parent 7f6911bd11cddd5d3400b361f6d92512888e2ab2 Code cleanup/optimization in VirtualMailManager's __getSalt(). diff -r 7f6911bd11cd -r ffac064bd728 VirtualMailManager/VirtualMailManager.py --- a/VirtualMailManager/VirtualMailManager.py Wed Sep 02 20:30:16 2009 +0000 +++ b/VirtualMailManager/VirtualMailManager.py Thu Sep 03 05:33:52 2009 +0000 @@ -370,10 +370,7 @@ if self.__scheme == 'CRYPT': salt = '%s%s' % (choice(SALTCHARS), choice(SALTCHARS)) elif self.__scheme in ['MD5', 'MD5-CRYPT']: - salt = '$1$' - for i in range(8): - salt += choice(SALTCHARS) - salt += '$' + salt = '$1$%s$' % ''.join([choice(SALTCHARS) for x in xrange(8)]) return salt def __pwCrypt(self, password):