summary refs log tree commit diff stats
path: root/ranger/ext/popen_forked.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-10 03:28:06 +0100
committerhut <hut@lavabit.com>2013-02-10 03:35:27 +0100
commitd1a1173ddc315f21a3d468f43ac55aa43d31883d (patch)
tree10d728b37294856eb21e6e962089ac38507d868c /ranger/ext/popen_forked.py
parent184e84284d2f4e48631a4b94b87ba76126470206 (diff)
downloadranger-d1a1173ddc315f21a3d468f43ac55aa43d31883d.tar.gz
replaced tabs with 4 spaces in all python files
PEP 8 (Style Guide for Python Code) suggests the use of 4 spaces:
http://www.python.org/dev/peps/pep-0008/#indentation

If you need to use tools like "git blame", you can use the -w option to
ignore this commit entirely.  Patches will continue to work if you
substitute tabs with 4 spaces everywhere except in the Makefile.
Diffstat (limited to 'ranger/ext/popen_forked.py')
-rw-r--r--ranger/ext/popen_forked.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/ranger/ext/popen_forked.py b/ranger/ext/popen_forked.py
index a9cf11a1..6c40d552 100644
--- a/ranger/ext/popen_forked.py
+++ b/ranger/ext/popen_forked.py
@@ -5,21 +5,21 @@ import os
 import subprocess
 
 def Popen_forked(*args, **kwargs):
-	"""
-	Forks process and runs Popen with the given args and kwargs.
+    """
+    Forks process and runs Popen with the given args and kwargs.
 
-	Returns True if forking succeeded, otherwise False.
-	"""
-	try:
-		pid = os.fork()
-	except OSError:
-		return False
-	if pid == 0:
-		os.setsid()
-		kwargs['stdin'] = open(os.devnull, 'r')
-		kwargs['stdout'] = kwargs['stderr'] = open(os.devnull, 'w')
-		subprocess.Popen(*args, **kwargs)
-		os._exit(0)
-	else:
-		os.wait()
-	return True
+    Returns True if forking succeeded, otherwise False.
+    """
+    try:
+        pid = os.fork()
+    except OSError:
+        return False
+    if pid == 0:
+        os.setsid()
+        kwargs['stdin'] = open(os.devnull, 'r')
+        kwargs['stdout'] = kwargs['stderr'] = open(os.devnull, 'w')
+        subprocess.Popen(*args, **kwargs)
+        os._exit(0)
+    else:
+        os.wait()
+    return True