Changeset 1063
- Timestamp:
- 07/26/06 16:25:51 (2 years ago)
- Files:
-
- accountmanagerplugin/0.9/acct_mgr/htfile.py (modified) (3 diffs)
- accountmanagerplugin/trunk/acct_mgr/htfile.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
accountmanagerplugin/0.9/acct_mgr/htfile.py
r1046 r1063 13 13 14 14 from binascii import hexlify 15 import errno 15 16 import md5 16 17 import os.path … … 94 95 filename = self._get_filename() 95 96 matched = False 96 if os.path.exists(filename):97 try: 97 98 for line in fileinput.input(filename, inplace=True): 98 99 if line.startswith(prefix): … … 102 103 else: 103 104 print line, 105 except EnvironmentError, e: 106 if e.errno == errno.ENOENT: 107 pass # ignore when file doesn't exist and create it below 108 elif e.errno == errno.EACCES: 109 raise TracError('The password file could not be updated. ' 110 'Trac requires read and write access to both ' 111 'the password file and its parent directory.') 112 else: 113 raise 104 114 if not matched and userline: 105 115 f = open(filename, 'a') accountmanagerplugin/trunk/acct_mgr/htfile.py
r1048 r1063 13 13 14 14 from binascii import hexlify 15 import errno 15 16 import md5 16 17 import os.path … … 95 96 filename = self.filename 96 97 matched = False 97 if os.path.exists(filename):98 try: 98 99 for line in fileinput.input(str(filename), inplace=True): 99 100 if line.startswith(prefix): … … 103 104 else: 104 105 print line, 106 except EnvironmentError, e: 107 if e.errno == errno.ENOENT: 108 pass # ignore when file doesn't exist and create it below 109 elif e.errno == errno.EACCES: 110 raise TracError('The password file could not be updated. ' 111 'Trac requires read and write access to both ' 112 'the password file and its parent directory.') 113 else: 114 raise 105 115 if not matched and userline: 106 116 f = open(filename, 'a')
