about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/__init__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ranger/__init__.py b/ranger/__init__.py
index 2228d40e..c7091a3e 100644
--- a/ranger/__init__.py
+++ b/ranger/__init__.py
@@ -21,10 +21,11 @@ def version_helper():
         import subprocess
         version_string = 'ranger-master {0}'
         try:
-            git_describe = subprocess.check_output(['git', 'describe'],
-                                                   universal_newlines=True,
-                                                   stderr=subprocess.PIPE)
-            version_string = version_string.format(git_describe.strip('\n'))
+            git_describe = subprocess.Popen(['git', 'describe'],
+                                            universal_newlines=True,
+                                            stdout=subprocess.PIPE)
+            (git_description, _) = git_describe.communicate()
+            version_string = version_string.format(git_description.strip('\n'))
         except (OSError, subprocess.CalledProcessError):
             version_string = version_string.format(__version__)
     return version_string