From 9f680e246c8ffc9664cf99d2db67fdb17e476aef Mon Sep 17 00:00:00 2001 From: rembo10 Date: Wed, 14 Mar 2012 21:11:03 +0000 Subject: [PATCH] Fixed the logging error in mb.py that was breaking musicbrainz searches --- headphones/mb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/headphones/mb.py b/headphones/mb.py index 993848da..02ce5c9d 100644 --- a/headphones/mb.py +++ b/headphones/mb.py @@ -47,8 +47,11 @@ def startmb(forcemb=False): q = ws.Query(service) logger.debug('Using the following server values:\nMBHost: %s ; MBPort: %i ; Sleep Interval: %i ' % (mbhost, mbport, sleepytime)) - if headphones.MIRROR == "headphones": - logger.debug('Headphones Username: %s ; Headphones Password: %s ' % (hpuser, len(hppass) * '*')) + if headphones.MIRROR == "headphones" and not forcemb: + try: + logger.debug('Headphones Username: %s ; Headphones Password: %s%s%s' % (hpuser, hppass[0],(len(hppass)-2) * '*', hppass[-1])) + except Exception, e: + logger.debug('Error logging hpuser or hppass: %s. Check your settings' % e) return (q, sleepytime)