summaryrefslogtreecommitdiff
blob: 98298a6b50e199596a050ec65a9fb930ac0e57fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/uwsgiconfig.py b/uwsgiconfig.py
index 5025b51..d817ae1 100644
--- a/uwsgiconfig.py
+++ b/uwsgiconfig.py
@@ -75,17 +75,7 @@ def spcall(cmd):
 	else:
 		return None
 
-def spcall2(cmd):
-	p = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE)
-
-	if p.wait() == 0:
-		if sys.version_info[0] > 2:
-			return p.stderr.read().rstrip().decode()
-		return p.stderr.read().rstrip()
-	else:
-		return None
-
-gcc_version = str(spcall2("%s -v" % GCC)).split('\n')[-1].split()[2]
+gcc_version = str(spcall("%s -dumpversion" % GCC))
 
 gcc_major = int(gcc_version.split('.')[0])
 gcc_minor = int(gcc_version.split('.')[1])