Browse Source

minor doc/debug improvement

boyska 7 years ago
parent
commit
0036750004
3 changed files with 3 additions and 3 deletions
  1. 1 1
      larigira/audiogen_mpdrandom.py
  2. 1 1
      larigira/audiogen_randomdir.py
  3. 1 1
      larigira/event.py

+ 1 - 1
larigira/audiogen_mpdrandom.py

@@ -13,7 +13,7 @@ def generate_by_artist(spec):
     log.info('generating')
     conf = get_conf()
     c = MPDClient()
-    c.connect(conf['MPD_HOST'], conf['MPD_PORT'])  # TODO: read global options somehow
+    c.connect(conf['MPD_HOST'], conf['MPD_PORT'])
 
     artists = c.list('artist')
     log.debug("got %d artists" % len(artists))

+ 1 - 1
larigira/audiogen_randomdir.py

@@ -22,7 +22,7 @@ def generate(spec):
 
     Recognized arguments:
         - paths [mandatory]    list of source paths
-        - howmany [mandatory]  number of audio files to pick
+        - howmany [default=1]  number of audio files to pick
     '''
     spec.setdefault('howmany', 1)
     for attr in ('paths', ):

+ 1 - 1
larigira/event.py

@@ -143,7 +143,7 @@ class Monitor(ParentedLet):
         audiogen.link_value(lambda g: self.log.info(
             'should play %s' % str(g.value)))
         audiogen.link_exception(lambda g: self.log.exception(
-            'Failure in audiogen {}'.format(audiospec)))
+            'Failure in audiogen {}: {}'.format(audiospec, audiogen.exception)))
         audiogen.link_value(lambda g: self.send_to_parent('add', g.value))
 
     def _run(self):