Skip to content

Commit

Permalink
reduced line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Miller-Medzon committed Jul 21, 2016
1 parent 66c76a3 commit 91002b8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions troposphere/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,16 @@ def iam_names(b):

def iam_user_name(user_name):
if len(user_name) > 64:
raise ValueError("AWS::IAM::User property 'UserName' may not exceed 64 characters")
raise ValueError(
"AWS::IAM::User property 'UserName' may not exceed 64 characters")

iam_user_name_re = compile(r'^[\w+=,.@-]+$')
if iam_user_name_re.match(user_name):
return user_name
else:
raise ValueError("%s is not a valid value for AWS::IAM::User property 'UserName'", user_name)
raise ValueError(
"%s is not a valid value for AWS::IAM::User property 'UserName'",
user_name)


def iam_path(path):
Expand Down

0 comments on commit 91002b8

Please sign in to comment.