summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-05-29 21:27:18 +0200
committertoonn <toonn@toonn.io>2019-05-29 21:27:18 +0200
commita47fd0480518f0ea1ad4a407be50a87a5690a94a (patch)
tree1494095c55b1239a470b6a78c946751e8db7a1f1
parente2df4002cedf71075de9c98c1624113afec9c5f7 (diff)
parentfe4bd0ff24402f2201bd216fe7ccc5464bd85f24 (diff)
downloadranger-a47fd0480518f0ea1ad4a407be50a87a5690a94a.tar.gz
Merge branch 'py26_subprocess'
-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