Skip to content

Commit

Permalink
Merge pull request #32 from cmd-ntrf/fix_regex
Browse files Browse the repository at this point in the history
Update lmod regexes to allow depth > 2
  • Loading branch information
cmd-ntrf committed Nov 25, 2020
2 parents 9735ee4 + 6b47b64 commit 3b1cc06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lmod/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
LMOD_SYSTEM_NAME = os.environ.get("LMOD_SYSTEM_NAME", "")
SITE_POSTFIX = os.path.join("lib", "python" + sys.version[:3], "site-packages")

MODULE_REGEX = re.compile(r"^([a-zA-z0-9-_+.]{1,}\/[a-zA-z0-9-_+.]{1,})$", re.M)
MODULE_REGEX_NO_HIDDEN = re.compile(r"^([a-zA-z0-9-_+.]{1,}\/[a-zA-z0-9-_][a-zA-z0-9-_.]*)$", re.M)
MODULE_REGEX = re.compile(r"^([\w\-_+.\/]{1,}[^\/:])$", re.M)
MODULE_REGEX_NO_HIDDEN = re.compile(r"^([^\W][\w\-_+.]*|[\w\-_+.\/]{1,}\/[\w][\w\-_.]*[^\/:])$", re.M)

async def module(command, *args):
cmd = LMOD_CMD, "python", "--terse", command, *args
Expand Down

0 comments on commit 3b1cc06

Please sign in to comment.