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

#38 Support multiple lightweight components of same type #59

Open
wants to merge 1 commit into
base: 1.0.x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions simple_grid_yaml_compiler/compiler/lexemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from ruamel.yaml.comments import CommentedSeq, CommentedMap

def get_repo_list(site_level_configuration_file):
urls = []
all_urls = []
find_revision = False
pending_url = None
revision_line = None
for line in site_level_configuration_file.readlines():
if find_revision:
revision_line = re.search('repository_revision\w*:(.*)', line)
revision_line_string = revision_line.group(1)
urls.append({
all_urls.append({
'url': pending_url,
'revision': revision_line_string.strip().replace("\"", '').replace('\'', '')
})
Expand All @@ -24,7 +24,8 @@ def get_repo_list(site_level_configuration_file):
url = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', url_line_string)
pending_url = url[0]
find_revision = True
return urls
unique_urls = [dict(y) for y in set(tuple(x.items()) for x in all_urls)]
return unique_urls

##########################################################################
# Warning: Badass recursive way to replace all __from__ keywords correctly
Expand Down