diff --git a/lib/Formula.py b/lib/Formula.py index 06d1a69..d6ff2dd 100644 --- a/lib/Formula.py +++ b/lib/Formula.py @@ -25,13 +25,15 @@ class Formula(): # check if the formula's name was defined if not 'name' in self.formula_def: # set the formula's name if need be - name_partial = [k for i, k in enumerate(self.formula_def.keys()) if i == 0][0] + name_partial = [k for k, v in self.formula_def.items() if v == None][0] self.formula_def['name'] = name_partial + '-formula' + # check if the dictionary has a git URL defined if 'url' in self.formula_def: git_url = str(self.formula_def['url']) else: git_url = str(self.formulas_url) + str(self.formula_def['name']) + # put together the local local_path = str(self.formulas_dir) + '/' + str(self.formula_def['name']) elif isinstance(self.formula_def, str):