| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
I thought tqdm was available everywhere, but it does not seem like
it will be in RHEL9. Revert back to the old urlgrabber copy, now
stored in virtinst/_progresspriv.py. If we ever want to try tqdm
again, we can just revert this commit
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
|
| |
tqdm is an external library that provides a progress bar
implementation. Switch to it and drop our internal copy of the
old urlgrabber progressbar
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
* Simplify start() and end() function signature
* Drop use of 'basename' and standardize on 'text'
* Add vmmMeter.is_started()
* Add vmmMeter.set_text()
* Fix asyncjob UI to show text in the progress bar
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'codespell' returns errors on this file in the format of:
virtinst/progress.py:527: fo ==> of, for
This has to do with the 'fo' instance variable of the TextMeter
class. The code was introduced in commit v1.2.1-131-gd5d6cfff,
when parts of the urlgrabber code were copied to avoid dependency
on python-urlgrabber.
Looking at how 'fo' is used, an alternative would be rename it to
'output', so let's make codespell and ourselves happier with less
lint errors.
Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
|
| |
|
|
|
|
| |
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
| |
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E226: missing whitespace around arithmetic operator
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
| |
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E502: the backslash is redundant between brackets
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
|
| |
E501: line too long (82 > 79 characters)
E305: expected 2 blank lines after end of function or class
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E231: missing whitespace after ‘,’, ‘;’, or ‘:’
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E129: visually indented line with same indent as next logical line
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E714: test for object identity should be ‘is not’
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E265: block comment should start with ‘# ‘
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E722: do not use bare except, specify exception instead
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E261: at least two spaces before inline comment
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E701: multiple statements on one line (colon)
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E221: multiple spaces before operator
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
E302: expected 2 blank lines
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
|
|
| |
W0201: Attribute %r defined outside __init__
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
| |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
|
|
|
|
|
| |
All URLs were checked to see if they supported https://, those which did
were converted.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The copyright headers in every file were chjanged in this previous commit
commit b6dcee8eb7ec4de999058c187162fe4aedef36b4
Author: Cole Robinson <crobinso@redhat.com>
Date: Tue Mar 20 15:00:02 2018 -0400
Use consistent and minimal license header for every file
Where before this they said "
"either version 2 of the License, or (at your option) any later version."
Now they just say
"GNU GPLv2"
This fixes it to say "GNU GPLv2 or later" again.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
| |
|
|
|
|
| |
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
|
|
|
|
| |
A few random issues scattered about
|
|
|
|
|
|
|
|
|
|
| |
- Python 2 only
k = 9223372036854775808L
- Python 2 and 3:
k = 9223372036854775808
See http://python-future.org/compatible_idioms.html#long-integers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 2 the classic devision of integers returns an integer
but in Python 3 it might return float.
Example:
- Python 2: - Python 3:
>>> 9 / 4 >>> 9 / 4
2 2.25
>>> 9 // 4 >>> 9 // 4
2 2
>>> 9 / 4.0 >>> 9 / 4.0
2.25 2.25
>>> 9 // 4.0 >>> 9 // 4.0
2.0 2.0
For more info see: https://www.python.org/dev/peps/pep-0238/
|
|
|
|
|
|
| |
Do not overwrite built-in format. [1]
https://docs.python.org/2/library/functions.html#format
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is E721 in pycodestyle [1]:
"do not compare types, use ‘isinstance()’"
The main differece between "type() is" and "isinstance()" is that
isinstance() supports inheritance. [1]
This can be seen in the example below:
>>> type(True) is int
False
>>> isinstance(True, int)
True
As we can see in python 'bool' a subclass of 'int'.
[1] https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
[2] https://docs.python.org/2/library/functions.html#isinstance
|
| |
|
|
|
|
| |
Plus one more python3 syntax issue
|
|
This is so we can drop the dep on system python-urlgrabber, which will
block us from going to python3.
All we need is like 300 lines from python-urlgrabber for the progress
bar. In reality our needs are much lower, we don't need the fancy
progress bar that urlgrabber provides, but it's nice to have. So if
keeping a copy of this code causes issues in the future, we can probably
come up with something simpler (or hopefully there's a more common
python progressbar impl that we can use at that point).
|