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

Python 3 support #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions osg-update-vos
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ from __future__ import print_function
import errno
import glob
import os
import pipes
try:
from pipes import quote
except ImportError:
from shlex import quote
import shutil
import subprocess
import sys
Expand Down Expand Up @@ -50,7 +53,7 @@ def get_options(argv):


def is_rpm_install(argv):
ret = os.system("rpm -qf " + pipes.quote(argv[0]) + " >/dev/null 2>&1")
ret = os.system("rpm -qf " + quote(argv[0]) + " >/dev/null 2>&1")
return (ret >> 8) == 0


Expand Down Expand Up @@ -115,7 +118,7 @@ def _download_vodata(repo=None):
except IndexError as err:
raise Error("Downloaded RPM not found")

subprocess.check_call("rpm2cpio %s | cpio -id --quiet" % pipes.quote(vodata_rpm), shell=True)
subprocess.check_call("rpm2cpio %s | cpio -id --quiet" % quote(vodata_rpm), shell=True)


def rmtree(path, ignore_errors=False):
Expand Down