Browse Source

Drop stderr from mocp query

Alois Mahdal 10 years ago
parent
commit
6f42ed9ab8
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      plugins/moc.py

+ 4
- 1
plugins/moc.py View File

@@ -2,6 +2,7 @@
2 2
 
3 3
 import sardine
4 4
 
5
+import os
5 6
 import subprocess
6 7
 
7 8
 
@@ -18,8 +19,10 @@ class TrackData(object):
18 19
         self.tt = ""    # total time
19 20
 
20 21
     def load(self):
22
+        FNULL = open(os.devnull, 'w+')
21 23
         for fieldname in self.__class__._field_names:
22
-            value = subprocess.check_output(['mocp', '-Q', "%" + fieldname])
24
+            value = subprocess.check_output(['mocp', '-Q', "%" + fieldname],
25
+                                            stderr=FNULL)
23 26
             setattr(self, fieldname, value.strip())
24 27
 
25 28