Skip to content

Commit

Permalink
remove notification in case mpd goes away
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo-Oli committed Apr 30, 2018
1 parent cd8cd2c commit 6653e49
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions termuxmpdnotifications/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ def __init__(self,args):
self.client.idle()
except mpd.ConnectionError:
self.err("Connection Aborted.")
self.removeNotification()
except ConnectionRefusedError:
self.err("Connection Refused.")
self.removeNotification()
def err(self,out):
print(out,file=sys.stderr)
def removeNotification(self):
Expand Down

0 comments on commit 6653e49

Please sign in to comment.