From: Mike Perez Date: Fri, 31 May 2013 08:11:13 +0000 (-0700) Subject: Updating HACKING to disallow the use of locals() X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6251df9068fc60b73085b8910d7faae4502152c2;p=openstack-build%2Fcinder-build.git Updating HACKING to disallow the use of locals() Change-Id: I7bf2720bdb0456274dc81a73d91296dff0e3fced --- diff --git a/HACKING.rst b/HACKING.rst index eecb286b5..f124e0095 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -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 -------