Adrian Reber
eb741528f1
Use 'is None' instead of '== None'
...
Signed-off-by: Adrian Reber <areber@redhat.com>
2020-11-08 01:55:25 -08:00
Adrian Reber
bbca79ab66
coredump: remove two unused variables
...
Signed-off-by: Adrian Reber <areber@redhat.com>
2020-11-08 01:55:25 -08:00
Radostin Stoyanov
08f3b57ab3
py: Manual fixlets of code formatting
...
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2020-02-04 12:37:37 -08:00
Radostin Stoyanov
72402c6e7a
py: Fix tabs in code comments
...
These were left by yapf formatter
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2019-09-07 15:59:57 +03:00
Andrei Vagin
5aa72e7237
py: Reformat everything into pep8 style
...
As discussed on the mailing list, current .py files formatting does not
conform to the world standard, so we should better reformat it. For this
the yapf tool is used. The command I used was
yapf -i $(find -name *.py)
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2019-09-07 15:59:56 +03:00
guoqd
66428d2845
[coredump]: correct the parsing of reg_files from files.img
...
Fixes #679
2019-09-07 15:59:49 +03:00
Radostin Stoyanov
c36b5dab05
python: Replace xrange with range
...
In Py2 `range` returns a list and `xrange` creates a sequence object
that evaluates lazily. In Py3 `range` is equivalent to `xrange` in Py2.
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2018-10-30 19:28:14 +03:00
Radostin Stoyanov
7ce23b2a74
python: Remove unused imports
...
Auto-detected with pylint.
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2018-10-30 19:28:01 +03:00
Dmitry Safonov
057c3f2947
python: specify python2 as .py interpreter
...
On some distro the default python interpreter is Python 3,
which results in such errors:
> Running zdtm/static/socket-tcp-closed.hook(--post-start)
> make[1]: Nothing to be done for default.
> ./socket-tcp-closed --pidfile=socket-tcp-closed.pid --outfile=socket-tcp-closed.out
> File "zdtm/static/socket-tcp-closed.hook", line 16
> except OSError, e:
> ^
> SyntaxError: invalid syntax
> ######### Test zdtm/static/socket-tcp-closed FAIL at hook --post-start #########
> Running zdtm/static/socket-tcp-closed.hook(--clean)
> File "zdtm/static/socket-tcp-closed.hook", line 16
> except OSError, e:
> ^
> SyntaxError: invalid syntax
> Traceback (most recent call last):
> File "zdtm.py", line 1921, in <module>
> do_run_test(tinfo[0], tinfo[1], tinfo[2], tinfo[3])
> File "zdtm.py", line 1388, in do_run_test
> try_run_hook(t, ["--clean"])
> File "zdtm.py", line 1053, in try_run_hook
> raise test_fail_exc("hook " + " ".join(args))
> __main__.test_fail_exc: <__main__.test_fail_exc instance at 0x76294468>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-04-17 18:35:58 +03:00
Pavel Emelyanov
92486c9015
coredump: Rename dir to coredump
...
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-06-28 13:04:58 +03:00