diff options
author | Russell Bryant <rbryant@redhat.com> | 2013-03-13 10:21:50 -0400 |
---|---|---|
committer | Russell Bryant <rbryant@redhat.com> | 2013-03-25 10:53:08 -0400 |
commit | 7390880e68e2342a23f76fe18cedc842914e3f46 (patch) | |
tree | 2ba20c85ad799449f4e8ec2a99debde41f7b478b /tools | |
parent | bceee56097ec705298caac0fa8651c3c0b79d972 (diff) | |
download | keystone-7390880e68e2342a23f76fe18cedc842914e3f46.tar.gz |
Sync with oslo-incubator.
Up to date as of 575e74d352d685773513218a286979bb58920246.
Change-Id: I302bd832fdd4ee6a325b600aceba525b109bb4e1
Diffstat (limited to 'tools')
-rw-r--r-- | tools/flakes.py | 19 | ||||
-rw-r--r-- | tools/install_venv_common.py | 5 |
2 files changed, 17 insertions, 7 deletions
diff --git a/tools/flakes.py b/tools/flakes.py index 7f96116ca..191bd6eab 100644 --- a/tools/flakes.py +++ b/tools/flakes.py @@ -4,12 +4,21 @@ Synced in from openstack-common """ + +__all__ = ['main'] + +import __builtin__ as builtins import sys -import pyflakes.checker -from pyflakes.scripts import pyflakes +import pyflakes.api +from pyflakes import checker + + +def main(): + checker.Checker.builtIns = (set(dir(builtins)) | + set(['_']) | + set(checker._MAGIC_GLOBALS)) + sys.exit(pyflakes.api.main()) if __name__ == "__main__": - orig_builtins = set(pyflakes.checker._MAGIC_GLOBALS) - pyflakes.checker._MAGIC_GLOBALS = orig_builtins | set(['_']) - sys.exit(pyflakes.main()) + main() diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index fd9076f0e..413065640 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -1,6 +1,6 @@ # vim: tabstop=4 shiftwidth=4 softtabstop=4 -# Copyright 2013 OpenStack, LLC +# Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may @@ -185,7 +185,8 @@ class Fedora(Distro): self.run_command(['sudo', 'yum', 'install', '-y', pkg], **kwargs) def apply_patch(self, originalfile, patchfile): - self.run_command(['patch', originalfile, patchfile]) + self.run_command(['patch', '-N', originalfile, patchfile], + check_exit_code=False) def install_virtualenv(self): if self.check_cmd('virtualenv'): |