Fixed bug in Scrapyd launcher when running projects without eggs. Refs #238

This commit is contained in:
Pablo Hoffman 2010-09-15 21:03:43 -03:00
parent a5908f052f
commit 4cecbcdc5b
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ class Launcher(Service):
def _get_eggpath(self, project):
eggstorage = self.app.getComponent(IEggStorage)
version, eggf = eggstorage.get(project)
if eggf is None:
return
prefix = '%s-%s-' % (project, version)
fd, eggpath = mkstemp(prefix=prefix, suffix='.egg')
lf = os.fdopen(fd, 'wb')