Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port ranges are now whitespace separated #59

Merged
merged 1 commit into from
Mar 26, 2014

Conversation

d22
Copy link

@d22 d22 commented Mar 23, 2014

No description provided.

def normalize_ranges_whitespace(ranges):
ranges = ranges.strip()
# reduce multiple whitespace-chars to exactly one space
ranges = re.sub('\s+', ' ', ranges)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd inline things here:

return re.sub('\s+', ' ', ranges.strip())

@dbrgn
Copy link
Member

dbrgn commented Mar 24, 2014

We should add a few tests for normalize_ranges_whitespace.

@dbrgn dbrgn merged commit 687a632 into master Mar 26, 2014
@dbrgn dbrgn deleted the issue48-comma-separated-portranges branch March 26, 2014 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants