from os.path import dirname, isabs, join, normpath, exists, isdir, isfile
from time import sleep
+from musicpd import VERSION as mversion
+from sima.info import __version__ as sversion
+
def getws(dic):
"""
aka = getencoder('rot-13')(str((aka), 'utf-8'))[0]
dic.update({'apikey': aka})
+
def parse_mpd_host(value):
passwd = host = None
# If password is set: MPD_HOST=pass@host
log = logging.getLogger(__name__)
log.error('Unhandled Exception!!!')
log.error(''.join(traceback.format_exc()))
+ log.info('musicpd python module version: %s', mversion)
+ log.info('MPD_sima version: %s', sversion)
log.info('Please report the previous message'
' along with some log entries right before the crash.')
log.info('thanks for your help :)')
sys.exit(1)
-class SigHup(Exception):
- """SIGHUP raises this Exception"""
-
-
# ArgParse Callbacks
class Obsolete(Action):
# pylint: disable=R0903
if isdir(self._file):
self.parser.error('need a file not a directory: {}'.format(self._file))
if not exists(self._dir):
- #raise ArgumentError(self, '"{0}" does not exist'.format(self._dir))
self.parser.error('directory does not exist: {0}'.format(self._dir))
if not exists(self._file):
# Is parent directory writable then
"""Generic MPD_sima Exception"""
+class SigHup(MPDSimaException):
+ """SIGHUP raises this Exception"""
+
+
# http client exceptions (for webservices)
class WSError(MPDSimaException):
pass