awx-api-lint: Fix setup.cfg syntax for linter test

Signed-off-by: Yanis Guenane <yguenane@redhat.com>
This commit is contained in:
Yanis Guenane
2020-02-26 11:07:41 +01:00
parent 4912cbd2da
commit 07232f3694
4 changed files with 11 additions and 9 deletions

View File

@@ -182,7 +182,8 @@ class CredentialType(HasCreate, base.Base):
response = self.connection.post(urljoin(str(self.url), 'test/'), data)
exception = exception_from_status_code(response.status_code)
exc_str = "%s (%s) received" % (
http.responses[response.status_code], response.status_code)
http.responses[response.status_code], response.status_code
)
if exception:
raise exception(exc_str, response.json())
elif response.status_code == http.FORBIDDEN:
@@ -328,7 +329,8 @@ class Credential(HasCopy, HasCreate, base.Base):
response = self.connection.post(urljoin(str(self.url), 'test/'), data)
exception = exception_from_status_code(response.status_code)
exc_str = "%s (%s) received" % (
http.responses[response.status_code], response.status_code)
http.responses[response.status_code], response.status_code
)
if exception:
raise exception(exc_str, response.json())
elif response.status_code == http.FORBIDDEN:

View File

@@ -1,5 +1,4 @@
from argparse import ArgumentParser
import traceback
import logging
import pdb # noqa
import sys
@@ -92,8 +91,8 @@ def main():
exc = e
raise
except Exception as e:
exc = e
rc = 1
exc = e # noqa
rc = 1 # noqa
raise