Skip to content

Commit

Permalink
Don't traceback in exRepoError() when repo info is not available. BZ …
Browse files Browse the repository at this point in the history
…1114183
  • Loading branch information
megaumi committed Sep 5, 2014
1 parent 8cd3ae1 commit 3d462e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yummain.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ def exRepoError(e):

repoui = _('Unknown')
repoid = _('<repoid>')
if hasattr(e, 'repo'):
try:
repoid = e.repo.id
repoui = e.repo.name
except AttributeError:
pass

msg = msg % {'repoid' : repoid, 'repo' : repoui}

Expand Down

0 comments on commit 3d462e7

Please sign in to comment.