IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Both APIs work with string lists (the getter returns it, the
setter gets keys to set from it) -> represent that as a python
list. The rest is kept as is in C.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
to be closes to pep8 which makes reading the generated code easier and
reduces the number of issues found by flake8.
Signed-off-by: Philipp Hahn <hahn@univention.de>
for nested dictionaries allows to remove the case distinction for
"first" from "all other" cases.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tuple() and list() are sequences, while dict() and set() are hash-based,
which is more efficient for contains().
Signed-off-by: Philipp Hahn <hahn@univention.de>
Use attr.get(key, default) instead.
Also use the empty sting "" as the default value instead of "None": Both
are "False" when used as a bool()ean, but "None" would require an
explicit check for "not None" in many places as str() and None have
different types.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
directly instead of explicitly requesting only the keys as a list and
converting that list to another list.
Checking directly for an element to be contained in a hash is much more
efficient as this is done using hashing O(1) instead of walking the list
in half on average O(n).
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
by using ''.join() instead of concatenating string fragments in a loop,
which is slower as it required re-hashing the string multiple times.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Commit ca394b9f "generator: Fix parent type" fixed the case for creating
`virStorage*` instances, which require a reference to `virConnect`, so
the special handling for `._conn` is no longer needed.
Commit ee5c856a "Remove legacy libvirtError arguments" removed the
different arguments, so all cases are the same now.
Signed-off-by: Philipp Hahn <hahn@univention.de>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
"\(" is not a valid escape sequence for a Python string, but currently
is passed on unmodified. This might breaks in the future when new escape
sequences are introduced.
> generator.py:1001:7: W605 invalid escape sequence '\('
> generator.py:1001:18: W605 invalid escape sequence '\)'
Use raw python string instead.
Signed-off-by: Philipp Hahn <hahn@univention.de>
sys.exc_info() returns a 3-tuple (type, value, traceback), where `value`
is the instance captured by `except type as value`.
Signed-off-by: Philipp Hahn <hahn@univention.de>