From 6ce4077856f86aabd98d0b18b1b81f1d63a72a03 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Wed, 2 Aug 2017 10:59:16 -0400 Subject: [PATCH] Fixed the Formula class' search for name --- lib/Formula.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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):