Skip to content

Commit 5e65244

Browse files
committed
Validate Python version. 3.5+ is required
subprocess.run() was added since Python 3.5+.
1 parent 870cd30 commit 5e65244

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/gen-proc-version.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import subprocess
2+
import sys
23
import string
34
from datetime import datetime
45
import argparse
56

67
def run_cmd(cmd):
8+
if sys.version_info < (3, 5):
9+
return 'unknown'
710
res = subprocess.run(cmd, universal_newlines=True,
811
stdout=subprocess.PIPE,
912
stderr=subprocess.STDOUT)

0 commit comments

Comments
 (0)