diff options
author | Endi S. Dewata <edewata@redhat.com> | 2016-02-24 22:22:10 +0100 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2016-02-26 13:12:14 -0500 |
commit | 935633c5ea9f2b5c4321d924af166367008ac4b3 (patch) | |
tree | 514fdf2533b8be3cc3fe7789a3736b294f6952ba /scripts | |
parent | 1d58b883ff9d0056d89d74d30f1375ab12d01f03 (diff) | |
download | pki-935633c5ea9f2b5c4321d924af166367008ac4b3.tar.gz pki-935633c5ea9f2b5c4321d924af166367008ac4b3.tar.xz pki-935633c5ea9f2b5c4321d924af166367008ac4b3.zip |
Added Python wrapper for pki pkcs12-import.
A Python wrapper module has been added for the pki pkcs12-import
command to provide a mechanism to implement a workaround for JSS
import limitation.
Additional fixes by cheimes have been merged into this patch:
setup.py:
We must track all sub-packages manually.
pylint-build-scan.py:
pylint confuses the 'pki' package with the 'pki' command. The
workaround symlinks the command and analysis the command under its
alternative name.
https://fedorahosted.org/pki/ticket/1742
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/pylint-build-scan.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/pylint-build-scan.py b/scripts/pylint-build-scan.py index e0db8fcb3..d4156e87b 100755 --- a/scripts/pylint-build-scan.py +++ b/scripts/pylint-build-scan.py @@ -38,7 +38,7 @@ PYLINTRC = os.path.join(SCRIPTPATH, 'dogtag.pylintrc') FILENAMES = [ os.path.abspath(__file__), '{sitepackages}/pki', - '{bin}/pki', + '{bin}/pki-cmd', # see HACK '{sbin}/pkispawn', '{sbin}/pkidestroy', '{sbin}/pki-upgrade', @@ -130,7 +130,17 @@ def main(): if args.verbose: pprint.pprint(pylint) - return subprocess.call(pylint, cwd=env['sitepackages']) + # HACK: + # pylint confuses the pki command with the pki package. We create a + # symlink from bin/pki to bin/pki-cmd and test bin/pki-cmd instead. + pki_bin = '{bin}/pki'.format(**env) + pki_cmd = '{bin}/pki-cmd'.format(**env) + os.symlink(pki_bin, pki_cmd) + + try: + return subprocess.call(pylint, cwd=env['sitepackages']) + finally: + os.unlink(pki_cmd) if __name__ == '__main__': sys.exit(main()) |