Get rid of commands module

This module is deprecated and not available in python3
This commit is contained in:
Alexander van Gessel 2017-09-20 15:22:21 +02:00 committed by loonycyborg
parent 6af2eb00df
commit 3776c57877
2 changed files with 3 additions and 3 deletions

View file

@ -9,7 +9,7 @@
EnsureSConsVersion(0,98,3)
import os, sys, shutil, re, commands
import os, sys, shutil, re, subprocess
from glob import glob
from subprocess import Popen, PIPE, call
from os import access, F_OK
@ -650,7 +650,7 @@ if 'dist' in COMMAND_LINE_TARGETS: # Speedup, the manifest is expensive
def dist_manifest():
"Get an argument list suitable for passing to a distribution archiver."
# Start by getting a list of all files under version control
lst = commands.getoutput("git ls-files | grep -v 'data\/test\/.*' | awk '/^[^?]/ {print $4;}'").split()
lst = subprocess.check_output("git ls-files | grep -v 'data\/test\/.*' | awk '/^[^?]/ {print $4;}'", shell=True).split()
lst = filter(os.path.isfile, lst)
return lst
dist_tarball = env.Tar('wesnoth-${version}.tar.bz2', [])

View file

@ -1,6 +1,6 @@
# vi: syntax=python:et:ts=4
import commands, os
import os
from subprocess import Popen, PIPE
from glob import glob