From e516f9af83b9873b2f2ce787177feae8179f9890 Mon Sep 17 00:00:00 2001
From: Xing Yang <xing.yang@emc.com>
Date: Fri, 29 Aug 2014 00:09:28 -0400
Subject: [PATCH] Ignore pylint error 'hashlib' has no shaxxx member

The following pylint error was found:

cinder/backup/drivers/swift.py:486: [E1101, SwiftBackupDriver.backup]
Module 'hashlib' has no 'sha256' member

Affected patch:
https://review.openstack.org/#/c/110068/

A similar pylint error "Module 'hashlib' has no 'sha224' member"
was also generated.

However, both 'sha256' and 'sha224' are functions in 'hashlib'.  So
these errors should be ignored.

Change-Id: I84690813b6c6a15e661e27acdf97149996951978
---
 tools/lintstack.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/lintstack.py b/tools/lintstack.py
index 22e267f65..d8459ff0e 100755
--- a/tools/lintstack.py
+++ b/tools/lintstack.py
@@ -32,11 +32,16 @@ ignore_codes = ["E1103"]
 # for cinder.tests modules
 # Note(fengqian): the second error message is the pattern of [E0611].
 # It should be ignored because use six module to keep py3.X compatibility.
-# Note(e0ne): the third error messege is for SQLAlchemy update() calls
+# Note(e0ne): the third error message is for SQLAlchemy update() calls
 # in DB schema migrations.
+# Note(xyang): the fourth and fifth error messages are for the code [E1101].
+# They should be ignored because 'sha256' and 'sha224' are functions in
+# 'hashlib'.
 ignore_messages = ["An attribute affected in cinder.tests",
                    "No name 'urllib' in module '_MovedItems'",
-                   "No value passed for parameter 'dml'"]
+                   "No value passed for parameter 'dml'",
+                   "Module 'hashlib' has no 'sha256' member",
+                   "Module 'hashlib' has no 'sha224' member"]
 # Note(maoy): we ignore all errors in openstack.common because it should be
 # checked elsewhere. We also ignore cinder.tests for now due to high false
 # positive rate.
-- 
2.45.2