@@ -73,7 +73,7 @@ def send_notice(message, address, sender=None):
7373 # available, or if it is present and a true value.
7474 rcpts = []
7575 if ('notify_recipient' not in config
76- or config ['notify_recipient' ]):
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' ])
@@ -123,9 +123,9 @@ def quarantine(body_path, control_paths, explanation):
123123 # Some sites would prefer that only admins release messages from the
124124 # quarantine.
125125 if ('user_release' in config
126- and config ['user_release' ] == 0
127- and 'also_notify' in config
128- and config ['also_notify' ]):
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' ],
@@ -137,7 +137,7 @@ def quarantine(body_path, control_paths, explanation):
137137 try :
138138 with open (body_path , 'rb' ) as body_file :
139139 qmessage = email .message_from_binary_file (body_file )
140- except Exception as e :
140+ except Exception :
141141 # TODO: Handle this error.
142142 raise # InitError('Internal failure parsing message data file: %s' % str(e))
143143 qmessage_sender = qmessage ['from' ]
@@ -189,8 +189,8 @@ def release(requested_id, address):
189189 return
190190 for x in courier .control .get_control_data (quarantine_paths [1 ])['r' ]:
191191 if (x [0 ] == address or
192- x [1 ] == address or
193- x [1 ] == '%s%s' % ('rfc822;' , address )):
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.
0 commit comments