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
 
2
 
3
 import sardine
3
 import sardine
4
 
4
 
5
+import os
5
 import subprocess
6
 import subprocess
6
 
7
 
7
 
8
 
18
         self.tt = ""    # total time
19
         self.tt = ""    # total time
19
 
20
 
20
     def load(self):
21
     def load(self):
22
+        FNULL = open(os.devnull, 'w+')
21
         for fieldname in self.__class__._field_names:
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
             setattr(self, fieldname, value.strip())
26
             setattr(self, fieldname, value.strip())
24
 
27
 
25
 
28