diff options
author | Jenkins <jenkins@review.openstack.org> | 2012-07-06 00:18:31 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-07-06 00:18:31 +0000 |
commit | e6ec6f851223151bec1d3ef47bb1030c1ebb598b (patch) | |
tree | 8caa214ed10ace40445065904eab55c279ec5660 /tools/hacking.py | |
parent | efa69b44ccdacc788a39b893d46168a725c95ec2 (diff) | |
parent | 7b43eaa9d8075c3d05fd17d19de12793a9c09692 (diff) | |
download | nova-e6ec6f851223151bec1d3ef47bb1030c1ebb598b.tar.gz nova-e6ec6f851223151bec1d3ef47bb1030c1ebb598b.tar.xz nova-e6ec6f851223151bec1d3ef47bb1030c1ebb598b.zip |
Merge "modify hacking.py to not choke on the def of _()"
Diffstat (limited to 'tools/hacking.py')
-rwxr-xr-x | tools/hacking.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/hacking.py b/tools/hacking.py index b924167f5..2d8ce92bc 100755 --- a/tools/hacking.py +++ b/tools/hacking.py @@ -283,10 +283,12 @@ def check_i18n(): """ while True: try: - token_type, text, _, _, _ = yield + token_type, text, _, _, line = yield except GeneratorExit: return - if token_type == tokenize.NAME and text == "_": + if (token_type == tokenize.NAME and text == "_" and + not line.startswith('def _(msg):')): + while True: token_type, text, start, _, _ = yield if token_type != tokenize.NL: |