diff options
author | Christian Heimes <cheimes@redhat.com> | 2015-08-11 20:55:48 +0200 |
---|---|---|
committer | Christian Heimes <cheimes@redhat.com> | 2015-08-14 13:03:18 +0200 |
commit | 12badcabc1cd345256a4902f7b0583cf667ecd8d (patch) | |
tree | d0a45d096fab9c0b14d5221557a616824ecfd24a /base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass | |
parent | d63ade55f5cc2a9ecf21ea2b43cfac80149c4c29 (diff) | |
download | pki-12badcabc1cd345256a4902f7b0583cf667ecd8d.tar.gz pki-12badcabc1cd345256a4902f7b0583cf667ecd8d.tar.xz pki-12badcabc1cd345256a4902f7b0583cf667ecd8d.zip |
Make pki PEP 8 compatible
Large portions of the patch was automatically created with autopep8:
find base/ -name '*.py' | xargs autopep8 --in-place --ignore E309 \
--aggressive
find base/common/upgrade base/server/upgrade -type f -and \
-not -name .gitignore | autopep8 --in-place --ignore E309 --aggressive
autopep8 --in-place --ignore E309 --aggressive \
base/common/sbin/pki-upgrade \
base/server/sbin/pkispawn \
base/server/sbin/pkidestroy \
base/server/sbin/pki-server \
base/server/sbin/pki-server-upgrade
About two dozent violations were fixed manually.
https://fedorahosted.org/pki/ticket/708
Diffstat (limited to 'base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass')
-rwxr-xr-x | base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass b/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass index 870fa981c..1cfff29f6 100755 --- a/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass +++ b/base/server/upgrade/10.1.99/04-ReplaceRESTEasyApplicationClass @@ -25,7 +25,9 @@ from lxml import etree as ET import pki import pki.server.upgrade -class ReplaceRESTEasyApplicationClass(pki.server.upgrade.PKIServerUpgradeScriptlet): + +class ReplaceRESTEasyApplicationClass( + pki.server.upgrade.PKIServerUpgradeScriptlet): def __init__(self): super(ReplaceRESTEasyApplicationClass, self).__init__() @@ -58,15 +60,20 @@ class ReplaceRESTEasyApplicationClass(pki.server.upgrade.PKIServerUpgradeScriptl if servlet is None: raise Exception('Resteasy servlet not found in ' + web_xml) - param = servlet.find('init-param[param-name="javax.ws.rs.Application"]') + param = servlet.find( + 'init-param[param-name="javax.ws.rs.Application"]') if param is None: - raise Exception('Resteasy application parameter not found in ' + web_xml) + raise Exception( + 'Resteasy application parameter not found in ' + + web_xml) value = param.find('param-value') if value is None: - raise Exception('Resteasy application value not found in ' + web_xml) + raise Exception( + 'Resteasy application value not found in ' + + web_xml) value.text = self.class_names[subsystem.name] |