comparison validate_affy_metadata.py @ 6:090e2594e4df draft

Uploaded
author greg
date Thu, 15 Jul 2021 20:02:45 +0000
parents 9d5a14c913b1
children
comparison
equal deleted inserted replaced
5:9fce688a1e91 6:090e2594e4df
57 57
58 def validate_email(line_no, email, accumulated_msgs): 58 def validate_email(line_no, email, accumulated_msgs):
59 if not (VALID_EMAIL_RE.match(email)): 59 if not (VALID_EMAIL_RE.match(email)):
60 return add_error_msg(accumulated_msgs, "Line %d contains an invalid email address (%s). " % (line_no, email)) 60 return add_error_msg(accumulated_msgs, "Line %d contains an invalid email address (%s). " % (line_no, email))
61 elif len(email) > EMAIL_MAX_LEN: 61 elif len(email) > EMAIL_MAX_LEN:
62 return add_error_msg(accumulated_msgs, "Line %d contains an email address (%) that is longer than the maximum length, %d characters." % (line_no, email)) 62 return add_error_msg(accumulated_msgs, "Line %d contains an email address (%s) that is longer than the maximum length, %d characters." % (line_no, email, EMAIL_MAX_LEN))
63 return accumulated_msgs 63 return accumulated_msgs
64 64
65 65
66 accumulated_msgs = "" 66 accumulated_msgs = ""
67 # Parse the input file, skipping the header, and validating 67 # Parse the input file, skipping the header, and validating