diff options
| author | Ultrabug <ultrabug@gentoo.org> | 2013-12-09 10:12:41 +0100 |
|---|---|---|
| committer | Ultrabug <ultrabug@gentoo.org> | 2013-12-09 10:12:41 +0100 |
| commit | d72dd6cea99d0a75eab9f29757eacaaf1b3560c2 (patch) | |
| tree | c9174941e63739d0f345cc22cc6607d73b433108 | |
| parent | d76358ef2cc6e645f6be94c136369b7f27366ff7 (diff) | |
redirect stdout and stderr to null to suppress modules outputs
| -rwxr-xr-x | py3status/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py3status/__init__.py b/py3status/__init__.py index 68d491f..5d36b2e 100755 --- a/py3status/__init__.py +++ b/py3status/__init__.py @@ -601,6 +601,10 @@ class Py3statusWrapper(): if self.config['debug']: syslog(LOG_INFO, 'events thread started') + # suppress modules' ouput wrt issue #20 + sys.stdout = open('/dev/null', 'w') + sys.stderr = open('/dev/null', 'w') + # load and spawn modules threads for include_path, f_name in self.list_modules(): try: |
