@@ -51,7 +51,7 @@ def _get_db():
5151 lock = open (lockpath , 'w' )
5252 fcntl .flock (lock , fcntl .LOCK_EX )
5353 dbm_file = dbm .open (dbmpath , 'c' )
54- return (dbm_file , lock )
54+ return (dbm_file , lock )
5555
5656
5757def _close_db (dbm_file , lock ):
@@ -72,8 +72,8 @@ def send_notice(message, address, sender=None):
7272 # Send the recipient a notice if notify_recipient isn't
7373 # available, or if it is present and a true value.
7474 rcpts = []
75- if ('notify_recipient' not in config
76- or config ['notify_recipient' ]):
75+ if ('notify_recipient' not in config
76+ or config ['notify_recipient' ]):
7777 rcpts .append (address )
7878 if 'also_notify' in config and config ['also_notify' ]:
7979 rcpts .append (config ['also_notify' ])
@@ -122,10 +122,10 @@ def quarantine(body_path, control_paths, explanation):
122122 # Prepare notice for recipients of quarantined message
123123 # Some sites would prefer that only admins release messages from the
124124 # quarantine.
125- if ('user_release' in config
126- and config ['user_release' ] == 0
127- and 'also_notify' in config
128- and config ['also_notify' ]):
125+ if ('user_release' in config
126+ and config ['user_release' ] == 0
127+ and 'also_notify' in config
128+ and config ['also_notify' ]):
129129 release_addr = config ['also_notify' ]
130130 else :
131131 release_addr = 'quarantine-%s-%s@%s' % (config ['siteid' ],
@@ -139,7 +139,7 @@ def quarantine(body_path, control_paths, explanation):
139139 qmessage = email .message_from_binary_file (body_file )
140140 except Exception as e :
141141 # TODO: Handle this error.
142- raise # InitError('Internal failure parsing message data file: %s' % str(e))
142+ raise # InitError('Internal failure parsing message data file: %s' % str(e))
143143 qmessage_sender = qmessage ['from' ]
144144 qmessage_subject = qmessage ['subject' ]
145145 message = """You received a message that was quarantined because:
@@ -188,9 +188,9 @@ def release(requested_id, address):
188188 send_failure_notice (requested_id , address )
189189 return
190190 for x in courier .control .get_control_data (quarantine_paths [1 ])['r' ]:
191- if (x [0 ] == address or
192- x [1 ] == address or
193- x [1 ] == '%s%s' % ('rfc822;' , address )):
191+ if (x [0 ] == address or
192+ x [1 ] == address or
193+ x [1 ] == '%s%s' % ('rfc822;' , address )):
194194 courier .sendmail .sendmail ('' , address , open (quarantine_paths [0 ], 'rb' ).readlines ())
195195 return
196196 # If no address matched, alert the user that the request was invalid.
@@ -219,6 +219,7 @@ def purge():
219219 # Unlock the DB
220220 _close_db (dbm_file , lock )
221221
222+
222223# Deprecated names preserved for compatibility with older releases
223224sendNotice = send_notice
224225sendFailureNotice = send_failure_notice
0 commit comments