Remove unused methods
This commit is contained in:
parent
4c58d3b773
commit
590bab2364
@ -8,7 +8,6 @@ import logging
|
||||
import multiprocessing
|
||||
import socket
|
||||
import sys
|
||||
import time
|
||||
|
||||
from mopidy import get_mpd_protocol_version, pickle_connection, settings
|
||||
from mopidy.mpd import MpdAckError
|
||||
@ -32,7 +31,6 @@ class MpdServer(asyncore.dispatcher):
|
||||
self.set_reuse_addr()
|
||||
self.bind((settings.SERVER_HOSTNAME, settings.SERVER_PORT))
|
||||
self.listen(1)
|
||||
self.started_at = int(time.time())
|
||||
logger.info(u'Please connect to %s port %s using an MPD client.',
|
||||
settings.SERVER_HOSTNAME, settings.SERVER_PORT)
|
||||
|
||||
@ -44,15 +42,6 @@ class MpdServer(asyncore.dispatcher):
|
||||
def handle_close(self):
|
||||
self.close()
|
||||
|
||||
def do_kill(self):
|
||||
logger.info(u'Received "kill". Shutting down.')
|
||||
self.handle_close()
|
||||
sys.exit(0)
|
||||
|
||||
@property
|
||||
def uptime(self):
|
||||
return int(time.time()) - self.started_at
|
||||
|
||||
|
||||
class MpdSession(asynchat.async_chat):
|
||||
"""
|
||||
@ -68,13 +57,6 @@ class MpdSession(asynchat.async_chat):
|
||||
self.set_terminator(LINE_TERMINATOR.encode(ENCODING))
|
||||
self.send_response(u'OK MPD %s' % get_mpd_protocol_version())
|
||||
|
||||
def do_close(self):
|
||||
logger.info(u'Closing connection with [%s]:%s', *self.client_address)
|
||||
self.close_when_done()
|
||||
|
||||
def do_kill(self):
|
||||
self.server.do_kill()
|
||||
|
||||
def collect_incoming_data(self, data):
|
||||
self.input_buffer.append(data)
|
||||
|
||||
@ -106,9 +88,6 @@ class MpdSession(asynchat.async_chat):
|
||||
data = output.encode(ENCODING)
|
||||
self.push(data)
|
||||
|
||||
def stats_uptime(self):
|
||||
return self.server.uptime
|
||||
|
||||
|
||||
def indent(string, places=4, linebreak=LINE_TERMINATOR):
|
||||
lines = string.split(linebreak)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user