Updating HACKING to disallow the use of locals()

Change-Id: I7bf2720bdb0456274dc81a73d91296dff0e3fced
This commit is contained in:
Mike Perez 2013-05-31 01:11:13 -07:00
parent f30afa6e70
commit 6251df9068
1 changed files with 9 additions and 0 deletions

View File

@ -46,6 +46,15 @@ General
if not (X in Y or X in Z): # OKAY, still better than all those 'not's
pass
- Do not use locals(). Example::
LOG.debug(_("volume %(vol_name)s: creating size %(vol_size)sG") %
locals()) # BAD
LOG.debug(_("volume %(vol_name)s: creating size %(vol_size)sG") %
{'vol_name': vol_name,
'vol_size': vol_size}) # OKAY
Imports
-------