Commit ae9f451f authored by Jondy Zhao's avatar Jondy Zhao

Fix option promises include empty file

parent 76ffed4e
...@@ -29,7 +29,7 @@ class Recipe(object): ...@@ -29,7 +29,7 @@ class Recipe(object):
else: else:
self.original_options = options.copy() self.original_options = options.copy()
options.update(platform_options) options.update(platform_options)
options['location'] = os.path.join( options['location'] = os.path.join(
buildout['buildout']['parts-directory'], buildout['buildout']['parts-directory'],
self.name) self.name)
...@@ -185,7 +185,7 @@ class Recipe(object): ...@@ -185,7 +185,7 @@ class Recipe(object):
def check_promises(self, log=None): def check_promises(self, log=None):
result = True result = True
log = logging.getLogger(self.name) log = logging.getLogger(self.name)
for path in self.options['promises'].splitlines(): for path in filter(None, self.options['promises'].splitlines()):
if not os.path.exists(path): if not os.path.exists(path):
result = False result = False
log.warning('could not find promise "%s"' % path) log.warning('could not find promise "%s"' % path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment