mirror of
https://github.com/beetbox/beets.git
synced 2026-02-25 08:45:01 +01:00
use new API for modern eventlet versions (specifically 0.9.7)
This commit is contained in:
parent
a6a232a6d4
commit
5402945866
1 changed files with 3 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ Beets library. Attempts to implement a compatible protocol to allow
|
|||
use of the wide range of MPD clients.
|
||||
"""
|
||||
|
||||
import eventlet.api
|
||||
import eventlet
|
||||
import re
|
||||
from string import Template
|
||||
import beets
|
||||
|
|
@ -226,10 +226,10 @@ class BaseServer(object):
|
|||
"""
|
||||
self.startup_time = time.time()
|
||||
try:
|
||||
self.listener = eventlet.api.tcp_listener((self.host, self.port))
|
||||
self.listener = eventlet.listen((self.host, self.port))
|
||||
while True:
|
||||
sock, address = self.listener.accept()
|
||||
eventlet.api.spawn(Connection.handle, sock, self)
|
||||
eventlet.spawn_n(Connection.handle, sock, self)
|
||||
except KeyboardInterrupt:
|
||||
pass # ^C ends the server.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue