Skip to content

Commit

Permalink
mpd: fix for older pygobject
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed May 5, 2014
1 parent d169f73 commit bd679a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugins/events/mpdserver/tcpserver.py
Expand Up @@ -11,6 +11,8 @@

from gi.repository import Gio, GLib

from quodlibet.qltk import io_add_watch


class ServerError(Exception):
pass
Expand Down Expand Up @@ -169,7 +171,7 @@ def can_read_cb(sock, flags, *args):

return True

self._in_id = GLib.io_add_watch(
self._in_id = io_add_watch(
self._sock, GLib.PRIORITY_DEFAULT,
GLib.IOCondition.IN | GLib.IOCondition.ERR | GLib.IOCondition.HUP,
can_read_cb)
Expand Down Expand Up @@ -212,7 +214,7 @@ def can_write_cb(sock, flags, *args):
return True

if self._out_id is None:
self._out_id = GLib.io_add_watch(
self._out_id = io_add_watch(
self._sock, GLib.PRIORITY_DEFAULT,
GLib.IOCondition.OUT | GLib.IOCondition.ERR |
GLib.IOCondition.HUP,
Expand Down

0 comments on commit bd679a6

Please sign in to comment.