aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2017-08-03 17:40:21 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2017-08-03 17:40:21 +0200
commit5103aeeda096df8777745b267b47ee8327da0e68 (patch)
tree93180ba969c7e1341d60185b389701c9ecc4cc93
parent170ff3fc42b5941b3cda5c02b042330fa7810b96 (diff)
pipe stderr to /dev/null
-rw-r--r--.gitignore4
-rw-r--r--emacs_bindings.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..02cb27e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+__pycache__
+*egg-info
+build
+dist
diff --git a/emacs_bindings.py b/emacs_bindings.py
index 5f4d3bc..03005be 100644
--- a/emacs_bindings.py
+++ b/emacs_bindings.py
@@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import argparse
+import subprocess
from configparser import ConfigParser
from os import makedirs
from os.path import exists, expanduser
@@ -22,7 +23,7 @@ try:
except ImportError: # Python < 3.5
from subprocess import call as run
-__version__ = "0.1"
+__version__ = "0.2"
def enable_gtk3():
@@ -54,7 +55,7 @@ def enable_gtk2():
def run_anyway(*args, **kwargs):
try:
- run(*args, **kwargs)
+ run(*args, **kwargs, stderr=subprocess.DEVNULL)
except FileNotFoundError:
pass