Commit Graph

10 Commits

Author SHA1 Message Date
songwenping 22e822dde2 Remove references to sys.version_info
We support Python 3.6 as a minimum now, making these checks no-ops.

Change-Id: Ia4b1eec7a788cb1ede3dc338f7be7e5d8a84069d
2021-07-10 06:20:08 +00:00
Hervé Beraud 986277d607 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Icaf1922963f4bc2fd2c4138aa3fe15cce5d3f1f7
2020-06-02 20:23:39 +02:00
rajat29 d4ae172125 Fix to use . to source script files
Adhering to coding conventions. Refer to ``Code conventions`` at
https://docs.openstack.org/contributor-guide/ for details.
When you have to source a script file, for example, a credentials file
to gain access to user-only or admin-only CLI commands, use . instead of source.
https://docs.openstack.org/contributor-guide/writing-style/code-conventions.html

Change-Id: I97c0cc8b9215b0f580311b1850b13a72f9ced60a
2017-09-05 13:04:29 +05:30
gecong1973 d597dab65c Using sys.exit(main()) instead of main()
As we known, Exceptions are raised by the sys.exit() function.
When they are not handled, no stack traceback is printed in the
Python interpreter. In this patch we have known main() got return
values(eg:0, 1), but it can't specifies exit status when terminate
the main thread by unusing sys.exit(). So when using sys.exit(main())
instead of main() may be more readable and reasonable.

Change-Id: Ie69b3a22dd1ddcd5586fc72f452cd162787f2f6f
2017-01-04 09:18:24 +08:00
Renat Akhmerov 4e2e46a07a Revert "Remove unused scripts in tools"
This reverts commit 1bf9ca58ef.

Change-Id: I005abaeb941fdbf182b2c9d991404be0dae89f32
Note: we need this because some of our gates use them, look at http://logs.openstack.org/23/400123/1/check/gate-mistral-tox-db-unit-postgresql-ubuntu-xenial/b9dfcef/console.html
2016-11-22 06:24:39 +00:00
pawnesh.kumar 1bf9ca58ef Remove unused scripts in tools
Change-Id: Id4545cb6feeea8dc28a3b9ea7b32bccf14f01813
2016-11-09 17:04:24 +05:30
Dan Prince 241b7565e2 Update install_venv.py so it says 'Mistral'
It currently prints 'Nova' in messages when I
use run_tests.sh.

Change-Id: Ibd720bfa23ff8275b62fd66e19c75393daef9314
2015-12-01 15:19:28 -05:00
Nikolay Mahotkin 9cfc57fed3 Move tests to testr
* Restored tools/install_venv scripts

Implements bp mistral-speedup-tests

Change-Id: I25d4755d1f06a248fe1de87da19f42fecba63404
2014-06-04 14:58:29 +04:00
Winson Chan 59830a49f1 Sync code with oslo-incubator
Updated openstack-common.conf and remove outdated modules. Ran update script
in oslo-incubator to generate modules in the mistral/openstack and tools
directories. Sqlalchemy backend has changed significantly in oslo-incubator.
Refactored mistral db api to address these changes and updated the base test
class DbTestCase accordingly.

Change-Id: I61327c33c0c8bc616af5e7633634461a2d7ac691
Implements: blueprint mistral-sync-with-incubator
2014-05-29 15:07:15 -07:00
Renat Akhmerov dacad2793a Adding virtual environment tools 2013-10-22 16:21:29 +07:00