diff options
| author | Angus Salkeld <asalkeld@redhat.com> | 2013-05-20 12:52:58 +1000 |
|---|---|---|
| committer | Angus Salkeld <asalkeld@redhat.com> | 2013-05-20 13:08:31 +1000 |
| commit | ae142c0ffe0c10348ef3e6ff38bbffae5cdd6f59 (patch) | |
| tree | e5c89fdba755afce7e5246e27804b97508e4a6ff /ceilometerclient/common | |
| parent | b324ccc37bc6c0dfded22ba5b4eccc96642791ba (diff) | |
| download | python-ceilometerclient-ae142c0ffe0c10348ef3e6ff38bbffae5cdd6f59.tar.gz | |
Fix pep H402 and H401 errors
This is an effort to get the pep ignores to be closer to nova.
Change-Id: I451df579bbead00a8ff2c301c1a84e7c0a896002
Diffstat (limited to 'ceilometerclient/common')
| -rw-r--r-- | ceilometerclient/common/base.py | 13 | ||||
| -rw-r--r-- | ceilometerclient/common/http.py | 7 |
2 files changed, 8 insertions, 12 deletions
diff --git a/ceilometerclient/common/base.py b/ceilometerclient/common/base.py index ae1ecfc..337ce60 100644 --- a/ceilometerclient/common/base.py +++ b/ceilometerclient/common/base.py @@ -29,9 +29,8 @@ except NameError: def getid(obj): - """ - Abstracts the common pattern of allowing both an object or an object's ID - (UUID) as a parameter when dealing with relationships. + """Abstracts the common pattern of allowing both an object or an + object's ID (UUID) as a parameter when dealing with relationships. """ try: return obj.id @@ -40,9 +39,8 @@ def getid(obj): class Manager(object): - """ - Managers interact with a particular type of API (servers, flavors, images, - etc.) and provide CRUD operations for them. + """Managers interact with a particular type of API + (samples, meters, alarms, etc.) and provide CRUD operations for them. """ resource_class = None @@ -78,8 +76,7 @@ class Manager(object): class Resource(object): - """ - A resource represents a particular instance of an object (tenant, user, + """A resource represents a particular instance of an object (tenant, user, etc). This is pretty much just a bag for attributes. :param manager: Manager object diff --git a/ceilometerclient/common/http.py b/ceilometerclient/common/http.py index 85b01f9..a773c41 100644 --- a/ceilometerclient/common/http.py +++ b/ceilometerclient/common/http.py @@ -124,7 +124,7 @@ class HTTPClient(object): return '%s/%s' % (base_url.rstrip('/'), url.lstrip('/')) def _http_request(self, url, method, **kwargs): - """ Send an http request with the specified characteristics. + """Send an http request with the specified characteristics. Wrapper around httplib.HTTP(S)Connection.request to handle tasks such as setting headers and error handling. @@ -224,8 +224,7 @@ class VerifiedHTTPSConnection(httplib.HTTPSConnection): self.insecure = insecure def connect(self): - """ - Connect to a host on a given (SSL) port. + """Connect to a host on a given (SSL) port. If ca_file is pointing somewhere, use it to check Server Certificate. Redefined/copied and extended from httplib.py:1105 (Python 2.6.x). @@ -253,7 +252,7 @@ class VerifiedHTTPSConnection(httplib.HTTPSConnection): @staticmethod def get_system_ca_file(): - """"Return path to system default CA file""" + """Return path to system default CA file.""" # Standard CA file locations for Debian/Ubuntu, RedHat/Fedora, # Suse, FreeBSD/OpenBSD ca_path = ['/etc/ssl/certs/ca-certificates.crt', |
