fixing error if you dont supply an argument

This commit is contained in:
Chuck 2013-07-05 15:11:38 +07:00
parent 2795a4ca8d
commit 6b534953de

View File

@ -141,7 +141,12 @@ class bitmessageSMTPChannel(asynchat.async_chat):
self.push('250 %s' % self.__fqdn)
def smtp_AUTH(self, arg):
encoding, pw = arg.split(' ')
try:
encoding, pw = arg.split(' ')
except ValueError:
self.invalid_command('501 Syntax: AUTH PLAIN auth')
return
if encoding != 'PLAIN':
self.invalid_command('501 method not understood')
return