示例#1
0
 def test_mpd_permission_error(self):
     try:
         raise MpdPermissionError(command='foo')
     except MpdPermissionError as e:
         self.assertEqual(
             e.get_mpd_ack(),
             'ACK [4@0] {foo} you don\'t have permission for "foo"')
示例#2
0
def kill(context):
    """
    *musicpd.org, connection section:*

        ``kill``

        Kills MPD.
    """
    raise MpdPermissionError(command='kill')
示例#3
0
def config(context):
    """
    *musicpd.org, reflection section:*

        ``config``

        Dumps configuration values that may be interesting for the client. This
        command is only permitted to "local" clients (connected via UNIX domain
        socket).
    """
    raise MpdPermissionError(command='config')