diff options
| author | haobing1 <hao.bing1@zte.com.cn> | 2016-09-01 14:34:13 +0800 |
|---|---|---|
| committer | haobing1 <hao.bing1@zte.com.cn> | 2016-09-01 17:34:45 +0800 |
| commit | 74ea43450b82c6ca7eeb54b1715f9fec27edd4ef (patch) | |
| tree | ff1ba1e6f6c1a48aa65be092c4f657c23655fa0f /tools | |
| parent | 29099bbc68496645a44e9bd0c32d189b8e91f7ab (diff) | |
| download | python-cinderclient-74ea43450b82c6ca7eeb54b1715f9fec27edd4ef.tar.gz | |
Remove self.__dict__ for formatting strings
Following OpenStack Style Guidelines:
http://docs.openstack.org/developer/hacking/#dictionaries-lists
It is not clear as using explicit dictionaries
and help avoid some errors during refactoring.
Change-Id: If29fa568b757e8e08ec2bd8986d08e422db9eee4
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/lintstack.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/lintstack.py b/tools/lintstack.py index 5639cec..acde2b0 100755 --- a/tools/lintstack.py +++ b/tools/lintstack.py @@ -116,7 +116,12 @@ class LintOutput(object): def review_str(self): return ("File %(filename)s\nLine %(lineno)d:%(line_content)s\n" - "%(code)s: %(message)s" % self.__dict__) # noqa + "%(code)s: %(message)s" % + {'filename': self.filename, + 'lineno': self.lineno, + 'line_content': self.line_content, + 'code': self.code, + 'message': self.message}) class ErrorKeys(object): |
