summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-06-22 12:10:07 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-06-22 12:10:07 +1000
commitf59eb5cbdd757cff9494c9bb9036147b5b47e0b0 (patch)
tree705416734ed48480b78adec3f6bb73a8810efcae
parentb2e709355b89585c61ef8ef5c6eff04b96d69e0d (diff)
General: Don't hardcode devnull dir
-rwxr-xr-xwal6
1 files changed, 3 insertions, 3 deletions
diff --git a/wal b/wal
index f56dcfa..e2bde3c 100755
--- a/wal
+++ b/wal
@@ -83,7 +83,7 @@ def process_args(args):
# -q
if args.q:
- sys.stdout = sys.stderr = open("/dev/null", "w")
+ sys.stdout = sys.stderr = open(os.devnull, "w")
# -c
if args.c:
@@ -114,8 +114,8 @@ def process_args(args):
# -o
if args.o:
subprocess.Popen(["nohup", args.o],
- stdout=open("/dev/null", "w"),
- stderr=open("/dev/null", "w"),
+ stdout=subprocess.DEVNULL,
+ stderr=subprocess.DEVNULL,
preexec_fn=os.setpgrp)