Skip to content

Commit

Permalink
Merge pull request #12050 from marcusburghardt/profile_class_product
Browse files Browse the repository at this point in the history
Include product property in profile class
  • Loading branch information
jan-cerny committed Jun 7, 2024
2 parents 46c4f45 + f5656d1 commit 2e85dc8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions utils/profile_tool/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ def get_profile(profiles_files, file, policies, profile=None):

class Profile:
def __init__(self, path, title):
self.path = path
normalized_path = os.path.normpath(path)
profile_file = os.path.basename(normalized_path)
self.path = normalized_path
self.title = title
self.id = profile_file.split('.profile')[0]
self.product = normalized_path.split('/')[-3]
self.rules = []
self.variables = {}
self.unselected_rules = []
profile_file = os.path.basename(path)
self.id = profile_file.split('.profile')[0]

def add_rule(self, rule_id):
if rule_id.startswith("!"):
Expand Down

0 comments on commit 2e85dc8

Please sign in to comment.