Skip to content

Commit

Permalink
Merge pull request #24 from mwestphall/SOFTWARE-5131-el9-python-six
Browse files Browse the repository at this point in the history
SOFTWARE-5131: el9 remove python six
  • Loading branch information
matyasselmeci authored Jun 5, 2023
2 parents 93577c0 + b6ad306 commit ce21a5b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
10 changes: 4 additions & 6 deletions rpm/hosted-ce-tools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
Summary: Tools for managing OSG Hosted CEs
Name: hosted-ce-tools
Version: 1.0
Release: 2%{?dist}
Release: 3%{?dist}
License: Apache 2.0
Url: https://github.com/opensciencegrid/hosted-ce-tools
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
%if 0%{?rhel} >= 8
Requires: python2-six
%else
Requires: python-six
%endif
Requires: fetch-crl
Requires: sudo
Requires: wget
Expand Down Expand Up @@ -56,6 +51,9 @@ systemctl daemon-reload


%changelog
* Fri Jun 02 2023 Matt Westphall <[email protected]> - 1.0-3
- Remove dependency on python-six (SOFTWARE-5131)

* Mon Mar 06 2023 Brian Lin <[email protected]> - 1.0-2
- Fix missed conversion to python3 (SOFTWARE-5131)

Expand Down
3 changes: 1 addition & 2 deletions scripts/update-all-remote-wn-clients
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import re
from subprocess import Popen, STDOUT
import sys

# noinspection PyUnresolvedReferences
from six.moves import configparser
import configparser


CONFIG_PATH = "/etc/endpoints.ini"
Expand Down
9 changes: 4 additions & 5 deletions scripts/update-remote-wn-client
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ import subprocess
from subprocess import CalledProcessError, Popen, PIPE, STDOUT
import sys
import tempfile

# noinspection PyUnresolvedReferences
from six.moves import shlex_quote, urllib
import urllib.request, urllib.error
from shlex import quote


OSG_CA_SCRIPTS_REPO = "https://github.com/opensciencegrid/osg-ca-scripts"
Expand Down Expand Up @@ -149,7 +148,7 @@ def rsync_upload(local_dir, remote_user, remote_host, remote_dir, ssh_key=None):
errstr = "Error rsyncing to remote host %s:%s: " % (remote_host, remote_dir)
try:
proc = Popen(
ssh + [remote_host, "[[ -e %s ]] || echo missing" % shlex_quote(remote_dir)],
ssh + [remote_host, "[[ -e %s ]] || echo missing" % quote(remote_dir)],
stdout=PIPE,
)
except OSError as e:
Expand Down Expand Up @@ -189,7 +188,7 @@ def rsync_upload(local_dir, remote_user, remote_host, remote_dir, ssh_key=None):
"rm -rf {0} && "
"mv {1} {0} && "
"mv {2} {1}".format(
shlex_quote(olddir), shlex_quote(remote_dir), shlex_quote(newdir))])
quote(olddir), quote(remote_dir), quote(newdir))])
except (OSError, CalledProcessError) as e:
raise Error("Error renaming remote directories: %s" % e)

Expand Down

0 comments on commit ce21a5b

Please sign in to comment.