Commits

Zhang Huangbin  committed 3d74114

Code cleanup.

  • Participants
  • Parent commits 0ef07a8

Comments (0)

Files changed (1)

File plugins/reject_sender_login_mismatch.py

 SENDER_SEARCH_ATTRLIST = []
 RECIPIENT_SEARCH_ATTRLIST = []
 
-# Allow sender login mismatch for below senders.
-if 'ALLOWED_LOGIN_MISMATCH_SENDERS' in dir(settings):
+# Allowed senders.
+try:
     ALLOWED_LOGIN_MISMATCH_SENDERS = settings.ALLOWED_LOGIN_MISMATCH_SENDERS
-else:
+except AttributeError:
     ALLOWED_LOGIN_MISMATCH_SENDERS = []
 
 def restriction(**kwargs):