Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixups #60

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion make-client-tarball
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ elif test -x /usr/libexec/platform-python; then
python=/usr/libexec/platform-python
else
echo >&2 "Can't find Python"
exit 255
exit 127
fi

exec "$python" "$(dirname "$0")/make_client_tarball.py" "$@"
11 changes: 7 additions & 4 deletions yumconf.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def yum_clean(self):
subprocess.call(["yum", "clean", "all"] + args, stdout=fnull)

def _get_yum_major_version(self):
proc = subprocess.Popen("yum --version | head -n1", shell=True, stdout=subprocess.PIPE)
output = to_str(proc.communicate()[0]).strip()
proc = subprocess.Popen(["yum", "--version"], stdout=subprocess.PIPE)
output = to_str(proc.communicate()[0]).strip().splitlines()[0]
version = output.split(".")
try:
return int(version[0])
Expand All @@ -125,13 +125,16 @@ def repoquery(self, *args):
cmd.extend(self.repo_args)
cmd.extend(args)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output = to_str(proc.communicate()[0])
output = to_str(proc.communicate()[0]).splitlines()[0]
retcode = proc.returncode

if not retcode:
return output
else:
raise subprocess.CalledProcessError("repoquery failed")
raise subprocess.CalledProcessError(retcode,
cmd,
output,
"")


def install(self, installroot, packages):
Expand Down