Fixed the Formula class' search for name
This commit is contained in:
parent
a7b7baec9d
commit
6ce4077856
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user