Commit ca5ed85c authored by Kevin Lyda's avatar Kevin Lyda 💬

Use subprocess module.

os.popen2 is deprecated on python because why not?  Use subprocess
module instead.
parent 584172ca
Pipeline #1050 failed with stage
in 5 minutes and 24 seconds
......@@ -19,6 +19,7 @@ This installs the chkcrontab command and the crontab.check module.
"""
import os
import subprocess
import sys
from distutils import file_util
from distutils import log
......@@ -27,7 +28,8 @@ from distutils.core import setup
from distutils.core import Command
BASE_DIR = os.path.dirname(globals().get('__file__', os.getcwd()))
VERSION = os.popen2('git describe --dirty="*" --always')[1].readline().strip()
VERSION = subprocess.check_output(
['git', 'describe', '--dirty=*', '--always']).strip()
open('_version.py', 'w').write('__version__ = "%s"\n' % VERSION)
class TestCmd(Command):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment