Placate pylint
This commit is contained in:
@@ -109,7 +109,8 @@ else:
|
||||
def get_string(self):
|
||||
lines = []
|
||||
if self.header:
|
||||
lines.append('\t'.join(name.upper() for name in self.field_names))
|
||||
lines.append('\t'.join(name.upper() for name in
|
||||
self.field_names))
|
||||
for row in sorted(self._rows, reverse=self.reversesort,
|
||||
key=operator.itemgetter(self._sortindex)):
|
||||
lines.append('\t'.join(map(str, row)))
|
||||
|
||||
@@ -95,7 +95,9 @@ class BaseRequest(BaseCommand):
|
||||
self.service = self.SERVICE_CLASS(self.config,
|
||||
loglevel=self.log.level)
|
||||
if self.auth is None and self.AUTH_CLASS is not None:
|
||||
# pylint: disable=not-callable
|
||||
self.auth = self.AUTH_CLASS(self.config, loglevel=self.log.level)
|
||||
# pylint: enable=not-callable
|
||||
BaseCommand._post_init(self)
|
||||
|
||||
@classmethod
|
||||
@@ -266,11 +268,11 @@ class AWSQueryRequest(BaseRequest):
|
||||
self.log.info('parameters: %s', redacted_params)
|
||||
|
||||
if self.method.upper() == 'POST':
|
||||
self.log.debug('sending flattened params as form data')
|
||||
self.log.debug('sending flattened parameters as form data')
|
||||
self.body = params
|
||||
self.params = {}
|
||||
else:
|
||||
self.log.debug('sending flattened params as query string')
|
||||
self.log.debug('sending flattened parameters as query string')
|
||||
self.params = params
|
||||
try:
|
||||
return BaseRequest.send(self)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2012-2015, Eucalyptus Systems, Inc.
|
||||
# Copyright (c) 2012-2016 Hewlett Packard Enterprise Development LP
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for
|
||||
# any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -22,7 +22,6 @@ import io
|
||||
import logging
|
||||
import os.path
|
||||
import random
|
||||
import socket
|
||||
import time
|
||||
|
||||
import requests.exceptions
|
||||
@@ -302,10 +301,12 @@ class BaseService(RegionConfigurableMixin):
|
||||
else:
|
||||
data = request.data
|
||||
for key, val in sorted(data.items()):
|
||||
# pylint: disable=superfluous-parens
|
||||
if key in (request.files or {}):
|
||||
# We probably don't want to include the contents of
|
||||
# entire files in debug output.
|
||||
continue
|
||||
# pylint: enable=superfluous-parens
|
||||
if key.lower().endswith('password'):
|
||||
val = '<redacted>'
|
||||
self.log.debug('request data: %s: %s', key, val)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2013-2014, Eucalyptus Systems, Inc.
|
||||
# Copyright (c) 2013-2016 Hewlett Packard Enterprise Development LP
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software for
|
||||
# any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -21,9 +21,9 @@ from requestbuilder import __version__
|
||||
|
||||
|
||||
class RequestBuilder(object):
|
||||
'''
|
||||
"""
|
||||
A class with attributes and methods that define an entire suite of tools
|
||||
'''
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.__user_agent = None
|
||||
|
||||
Reference in New Issue
Block a user