Skip to content

Commit

Permalink
Update ivy_utils error messages: include classifier and switch
Browse files Browse the repository at this point in the history
interpolation from % to format.

Testing Done:
Ran ivy tests.  CI running:
https://travis-ci.org/pantsbuild/pants/builds/54173064

Reviewed at https://rbcommons.com/s/twitter/r/1908/
  • Loading branch information
dturner-tw committed Mar 13, 2015
1 parent e831fc6 commit b949016
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/python/pants/backend/jvm/ivy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def xml_report_path(cls, targets, conf):
"""The path to the xml report ivy creates after a retrieve."""
org, name = cls.identify(targets)
cachedir = Bootstrapper.instance().ivy_cache_dir
return os.path.join(cachedir, '%s-%s-%s.xml' % (org, name, conf))
return os.path.join(cachedir, '{}-{}-{}.xml'.format(org, name, conf))

@classmethod
def parse_xml_report(cls, targets, conf):
Expand Down Expand Up @@ -325,24 +325,24 @@ def _resolve_conflict(existing, proposed):
return proposed
return existing
elif existing.force and proposed.force:
raise TaskError('Cannot force %s#%s to both rev %s and %s' % (
proposed.org, proposed.name, existing.rev, proposed.rev
raise TaskError('Cannot force {}#{};{} to both rev {} and {}'.format(
proposed.org, proposed.name, proposed.classifier or '', existing.rev, proposed.rev
))
elif existing.force:
logger.debug('Ignoring rev %s for %s#%s already forced to %s' % (
proposed.rev, proposed.org, proposed.name, existing.rev
logger.debug('Ignoring rev {} for {}#{};{} already forced to {}'.format(
proposed.rev, proposed.org, proposed.name, proposed.classifier or '', existing.rev
))
return existing
elif proposed.force:
logger.debug('Forcing %s#%s from %s to %s' % (
proposed.org, proposed.name, existing.rev, proposed.rev
logger.debug('Forcing {}#{};{} from {} to {}'.format(
proposed.org, proposed.name, proposed.classifier or '', existing.rev, proposed.rev
))
return proposed
else:
try:
if Revision.lenient(proposed.rev) > Revision.lenient(existing.rev):
logger.debug('Upgrading %s#%s from rev %s to %s' % (
proposed.org, proposed.name, existing.rev, proposed.rev,
logger.debug('Upgrading {}#{};{} from rev {} to {}'.format(
proposed.org, proposed.name, proposed.classifier or '', existing.rev, proposed.rev,
))
return proposed
else:
Expand Down

0 comments on commit b949016

Please sign in to comment.