~ubuntu-branches/ubuntu/trusty/cinder/trusty

« back to all changes in this revision

Viewing changes to tools/flakes.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Yolanda Robla Mota, James Page, Chuck Short
  • Date: 2013-02-22 10:45:17 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20130222104517-ng3r6ace9vi4m869
Tags: 2013.1.g3-0ubuntu1
[ Yolanda Robla Mota ]
* d/control: Add BD on python-hp3parclient.
* d/patches: Drop patches related to disabling hp3parclient.

[ James Page ]
* d/control: Add Suggests: python-hp3parclient for python-cinder.
* d/control: Add BD on python-oslo-config.
* d/*: Wrapped and sorted.

[ Chuck Short ]
* New upstream release.
* debian/rules, debian/cinder-volumes.install: 
  - Fail if binaries are missing and install missing binaries.
* debian/patches/fix-ubuntu-tests.patch: Fix failing tests.
* debian/control: Add python-rtslib and python-mock.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 wrapper for pyflakes to ignore gettext based warning:
3
3
     "undefined name '_'"
4
4
 
5
 
 From https://bugs.launchpad.net/pyflakes/+bug/844592
 
5
 Synced in from openstack-common
6
6
"""
7
 
import __builtin__
8
 
import os
9
7
import sys
10
8
 
11
 
from pyflakes.scripts.pyflakes import main
 
9
import pyflakes.checker
 
10
from pyflakes.scripts import pyflakes
12
11
 
13
12
if __name__ == "__main__":
14
 
    names = os.environ.get('PYFLAKES_BUILTINS', '_')
15
 
    names = [x.strip() for x in names.split(',')]
16
 
    for x in names:
17
 
        if not hasattr(__builtin__, x):
18
 
            setattr(__builtin__, x, True)
19
 
 
20
 
    del names, os, __builtin__
21
 
 
22
 
    sys.exit(main())
 
13
    orig_builtins = set(pyflakes.checker._MAGIC_GLOBALS)
 
14
    pyflakes.checker._MAGIC_GLOBALS = orig_builtins | set(['_'])
 
15
    sys.exit(pyflakes.main())