mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/tglx/remail.git
synced 2024-11-21 20:02:38 +01:00
remail/remaild: Fix failure message
While handling an exception in process_msg() the handler triggers another one by trying to print a undefined variable (mailfile). Hand the mailfile name into the function. Use 'pipe input' for pipe mode. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
7d69dec9ae
commit
43a0b5cb47
1 changed files with 3 additions and 3 deletions
|
@ -184,7 +184,7 @@ class remaild(object):
|
|||
except:
|
||||
pass
|
||||
|
||||
def process_msg(self, msg):
|
||||
def process_msg(self, msg, mailfile):
|
||||
# Check whether one of the lists will take it
|
||||
for ml in self.mailinglists:
|
||||
if not ml.enabled:
|
||||
|
@ -220,7 +220,7 @@ class remaild(object):
|
|||
self.move_frozen(mailfile)
|
||||
continue
|
||||
|
||||
res = self.process_msg(msg)
|
||||
res = self.process_msg(msg, mailfile)
|
||||
|
||||
if res == 0:
|
||||
os.unlink(mailfile)
|
||||
|
@ -379,7 +379,7 @@ class remaild(object):
|
|||
|
||||
policy = EmailPolicy(utf8=True)
|
||||
msg = message_from_file(sys.stdin, policy=policy)
|
||||
return self.process_msg(msg)
|
||||
return self.process_msg(msg, 'pipe input')
|
||||
|
||||
# The runner
|
||||
def run(self):
|
||||
|
|
Loading…
Reference in a new issue