Skip to content

Commit

Permalink
chg: Only warn about missing grako when the plugin is used. Fixes #115
Browse files Browse the repository at this point in the history
  • Loading branch information
nicfit committed Nov 4, 2017
1 parent 54b4735 commit 87f80df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/eyed3/plugins/classic.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,8 @@ def _checkNumberedArgTuples(curr, new):
("lyrics", self.args.lyrics, tag.lyrics),
):
for text, desc, lang in arg:
printWarning("Setting %s: %s/%s" % (what, desc, lang))
printWarning("Setting %s: %s/%s" %
(what, desc, compat.unicode(lang, "ascii")))
accessor.set(text, desc, compat.b(lang))
retval = True

Expand Down
5 changes: 3 additions & 2 deletions src/eyed3/plugins/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
_have_grako = True
except ImportError:
_have_grako = False
console.printError(u"Unknown module 'grako'" + os.linesep +
u"Please install grako! E.g. with $ pip install grako")


class Pattern(object):
Expand Down Expand Up @@ -1021,6 +1019,9 @@ def start(self, args, config):
return

if not _have_grako:
console.printError(u"Unknown module 'grako'" + os.linesep +
u"Please install grako! " +
u"E.g. $ pip install grako")
self.__return_code = 2
return

Expand Down

0 comments on commit 87f80df

Please sign in to comment.