Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Merge "Changed the 'raise validate_email_address' to 'raise ValueErro…
Browse files Browse the repository at this point in the history
…r' Closes-Bug:1578643 Change-Id: I15c937cf21829042e0ee725f45bb74b8084d9d41"
  • Loading branch information
Jenkins authored and openstack-gerrit committed May 18, 2016
2 parents 8199631 + 190fe44 commit 581e4fb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions poppy/notification/mailgun/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ def __init__(self, conf):

# validate email addresses
if not validate_email_address(self.from_address):
raise validate_email_address("Notification config error:"
"%s is not a valid email address"
% self.from_address)
raise ValueError(
"Notification config error: "
"{0} is not a valid email address".format(self.from_address)
)

for address in self.recipients:
if not validate_email_address(address):
raise validate_email_address("Notification config error:"
"%s is not a valid email address"
% address)
raise ValueError(
"Notification config error: "
"{0} is not a valid email address".format(address)
)

@property
def services_controller(self):
Expand Down

0 comments on commit 581e4fb

Please sign in to comment.