16 Commits

Author SHA1 Message Date
Swapnil Kulkarni (coolsvap)
7bd4ebdc38 Keep py3.X compatibility for urllib
urllib/urllib2 is incompatible for python 3
Use modules from six.moves.urllib instead of urllib
and urllib2

Change-Id: Ic9d8ce4e700d19053c67cf667e1d802bd1477108
Partial-Bug:#1280105
2016-03-14 08:27:45 +05:30
Christian Berendt
d124f83643 Use yaml.safe_load() instead of yaml.load()
According to Bandit yaml.safe_load() should be used instead of
yaml.load().

Use of unsafe yaml load. Allows instantiation of arbitrary objects.
Consider yaml.safe_load().

Change-Id: I7dd536c61ff53bf0b07cf4681df64fbec99140b6
2015-02-24 14:05:19 +01:00
Andreas Jaeger
f5f53acae8 Update to hacking 0.10
Update version of hacking.

To pass our gates with the new hacking version, remove author tags.
Note: hacking needs to be manually synced.

Change-Id: I8a4db46a8df2f1e8d1cd22ae6ac421d55ac9ccce
2015-01-13 09:04:27 +01:00
Rafael Rivero
8af0f7483f Typo "Initialze" instead of "Initialize"
Misspelling of "Initialize" in method initialize_logging.

Change-Id: Idc860959b63162e7fa8f1eecb3854b3e0a6ce9e2
2014-09-18 12:46:20 -07:00
Christian Berendt
d449a6bcd2 Bump hacking to 0.9.x series
Require at least 0.9.1 because 0.9.0. had a minor bug.

This change also fixes all found issues.

Rewrote some docstrings to fit H405.

Change-Id: Ifeef11b783dbe70b2652d2b9ea29d5b20f69f2ce
2014-06-12 09:17:22 +02:00
Christian Berendt
2a080a98f5 A script to prettify HTML and XML syntax
Change-Id: Ibc96beb7db89d47acd98f1ff00c8630ee9d0e511
2014-06-10 16:03:42 +02:00
Christian Berendt
a343ec6c45 make sure that source is not a directory
Also fix wrong variable name in logging messages.

Change-Id: Ic5b03714b258859a0eb4a4004b13857ee2b1ae5d
2014-05-28 22:43:04 +02:00
Christian Berendt
b98d634dac use /usr/bin/env python instead of /usr/bin/python
Change-Id: Iaf021724a9eb06e32590e0d7d811c8fbf3161194
2014-05-23 12:11:52 +02:00
Jenkins
b62e875bb1 Merge "script to apply RETF rules onto a set of files" 2014-05-21 21:52:54 +00:00
Christian Berendt
bc43269ada script to apply RETF rules onto a set of files
This script applies a set of regular expressions onto a set of files
to automatically identify and fix typographical errors. More details
inside the README.md.

Change-Id: Ib1121e6b891c1f2ef998c5d46c21ff05773090bd
2014-05-19 14:35:02 +02:00
Christian Berendt
dfa10c5c5d fixed several pep8 issues
* E129 visually indented line with same indent as next logical line
  * E129 visually indented line with same indent as next logical line
  * E265 block comment should start with '# '
  * E713 test for membership should be 'not in'

Change-Id: I8488f7ad4399153d99325806fe87919c0b4cda7e
2014-05-17 08:37:07 +02:00
Andreas Jaeger
086e22e466 Require hacking for additional checks
Require hacking for additional pep8 checks to follow
OpenStack python hacking conventions.

Fix problems found by hacking.

Disable autogenerate-config-docs from check, it needs further
work to be clean enough.

Change-Id: Ib1dedf2e8262ba3d8ae1b58c4e4dbab82bbb5297
2014-01-03 11:25:56 +01:00
Andreas Jaeger
cac7a82126 Explicitely add license information to code files
Following OpenStack conventions, let's add a license header to
all code files.

Change-Id: Ia1992f3e8aba45e96cff6482613ec50df4fca980
2013-12-30 16:08:52 +01:00
Andreas Jaeger
bbf9427b38 Fix issues found by flake8
Fix overlong lines, remove unused imports, remove unused
variables

Change-Id: Ic30640891af5413d57c82a1666f81518168e4a88
2013-12-18 21:23:12 +01:00
Andreas Jaeger
ff2aba90a4 Fix cleanup tools
Adjust for manual move
Do not assume that tmpfile and target are on the same filesystem and
use copy instead of rename.

Change-Id: Ide16e541032f5bcc3ea462a9347faebdc5d7d670
2013-10-08 14:24:07 +02:00
Christian Berendt
de0d92c396 added scripts to cleanup spaces in XML files
example for remove_trailing_whitespaces.sh:

"  testing   \n" --> "  testing\n"

examples for remove_unnecessary_spaces.py:

"<testing>    foobar foobar" --> "<testing>foobar foobar"
"foobar foobar   </testing>" --> "foobar foobar</testing>"

Change-Id: Ie15a7a1491bf412ff893c84e76061ef623581145
2013-08-15 11:42:12 +02:00