Changes between Version 57 and Version 58 of TracStandalone
- Timestamp:
- Jul 23, 2008, 1:43:35 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracStandalone
v57 v58 114 114 #!python 115 115 from optparse import OptionParser 116 import md5 116 # The md5 module is deprecated in Python 2.5 117 try: 118 from hashlib import md5 119 except ImportError: 120 from md5 import md5 117 121 118 122 # build the options … … 131 135 # Generate the string to enter into the htdigest file 132 136 realm = 'trac' 133 kd = lambda x: md5 .md5(':'.join(x)).hexdigest()137 kd = lambda x: md5(':'.join(x)).hexdigest() 134 138 print ':'.join((options.username, realm, kd([options.username, realm, options.password]))) 135 139 }}}