Permalink
Browse files

Fix ivy resolve to handle those cases where no dependencies are resol…

…ved.
  • Loading branch information...
1 parent 7093918 commit d5bde6e683cc705f77018d8bcbf05c576bbe4202 John Sirois committed Feb 13, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/python/twitter/pants/tasks/ivy_resolve.py
@@ -112,11 +112,12 @@ def is_classpath(t):
if changed_deps:
self._ivycachepath(self._ivy_xml, self._classpath_file, *targets)
- with self._cachepath(self._classpath_file) as classpath:
- with self.context.state('classpath', []) as cp:
- for path in classpath:
- for conf in self._confs:
- cp.append((conf, path.strip()))
+ if os.path.exists(self._classpath_file):
+ with self._cachepath(self._classpath_file) as classpath:
+ with self.context.state('classpath', []) as cp:
+ for path in classpath:
+ for conf in self._confs:
+ cp.append((conf, path.strip()))
create_jardeps_for = self.context.products.isrequired('jar_dependencies')
if create_jardeps_for:

0 comments on commit d5bde6e

Please sign in to comment.