Skip to content

remove unwanted characters from builddirs#591

Merged
boegel merged 2 commits intoeasybuilders:developfrom
JensTimmerman:extensions
Apr 22, 2013
Merged

remove unwanted characters from builddirs#591
boegel merged 2 commits intoeasybuilders:developfrom
JensTimmerman:extensions

Conversation

@JensTimmerman
Copy link
Copy Markdown

  • some other slight changes to extensions, added to debug some stuff for Perl

Comment thread easybuild/framework/easyblock.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel @gribozavr had a valid point here.

Suggested alternative (validated to yield the same result):

CHARMAP = 256 * ['_']  # default: map everything to _
for char in string.digits + string.ascii_letters:
    CHARMAP[ord(char)] = char
CHARMAP = ''.join(CHARMAP)  # collapse to a string

or single-line:

CHARMAP = ''.join([('_', chr(i))[chr(i) in (string.digits + string.ascii_letters)] for i in range(0,256)])

boegel added a commit that referenced this pull request Apr 22, 2013
remove unwanted characters from builddirs
@boegel boegel merged commit 270146d into easybuilders:develop Apr 22, 2013
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.

3 participants