summaryrefslogtreecommitdiff
path: root/virtinst/progress.py
Commit message (Collapse)AuthorAgeFilesLines
* progress: Drop tqdm and revert back to local urlgrabber copyCole Robinson2021-06-091-34/+16
| | | | | | | | | 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>
* progress: convert to tqdmCole Robinson2021-05-221-503/+48
| | | | | | | | 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>
* progress: Some internal API cleanupCole Robinson2021-05-221-15/+7
| | | | | | | | | | * 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>
* virtinst/progress.py: change 'fo' to make codespell happyDaniel Henrique Barboza2020-07-041-7/+7
| | | | | | | | | | | | | | | | | | '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>
* util: Move *_meter to progress.pyCole Robinson2019-06-071-0/+13
|
* progress: Remove commented out codeRadostin Stoyanov2018-11-121-3/+0
| | | | Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve protected-accessRadostin Stoyanov2018-11-121-11/+11
| | | | Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E226Radostin Stoyanov2018-11-121-1/+1
| | | | | | E226: missing whitespace around arithmetic operator Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Don't use black-listed name 'bar'Radostin Stoyanov2018-11-121-5/+7
| | | | Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E502Radostin Stoyanov2018-11-121-1/+1
| | | | | | E502: the backslash is redundant between brackets Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E501 and E305Radostin Stoyanov2018-11-121-4/+8
| | | | | | | 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>
* progress: Resolve E231Radostin Stoyanov2018-11-121-1/+1
| | | | | | E231: missing whitespace after ‘,’, ‘;’, or ‘:’ Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E129Radostin Stoyanov2018-11-121-1/+1
| | | | | | E129: visually indented line with same indent as next logical line Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E714Radostin Stoyanov2018-11-121-1/+1
| | | | | | E714: test for object identity should be ‘is not’ Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E265Radostin Stoyanov2018-11-121-4/+4
| | | | | | E265: block comment should start with ‘# ‘ Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E722Radostin Stoyanov2018-11-121-1/+1
| | | | | | E722: do not use bare except, specify exception instead Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E261Radostin Stoyanov2018-11-121-12/+12
| | | | | | E261: at least two spaces before inline comment Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E701Radostin Stoyanov2018-11-121-19/+38
| | | | | | E701: multiple statements on one line (colon) Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E221Radostin Stoyanov2018-11-121-19/+19
| | | | | | E221: multiple spaces before operator Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve E302Radostin Stoyanov2018-11-121-0/+14
| | | | | | E302: expected 2 blank lines Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* progress: Resolve W0201Radostin Stoyanov2018-11-121-0/+6
| | | | | | W0201: Attribute %r defined outside __init__ Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* Fix some typos in comments and documentation (found by codespell)Stefan Weil2018-06-051-1/+1
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Chagne most URIs to use https:// instead of http://Daniel P. Berrangé2018-04-301-1/+1
| | | | | | | All URLs were checked to see if they supported https://, those which did were converted. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* Fix copyright header to specify GPLv2 or later, not GPLv2 only.Daniel P. Berrangé2018-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* Use consistent and minimal license header for every fileCole Robinson2018-03-211-16/+2
|
* virtinst: progress: Simplify if-statementRadostin Stoyanov2018-03-031-8/+4
| | | | Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
* Fix initrdinject and urltests with py3Cole Robinson2018-02-061-0/+1
| | | | A few random issues scattered about
* Convert long to intRadostin Stoyanov2018-02-061-1/+1
| | | | | | | | | | - Python 2 only k = 9223372036854775808L - Python 2 and 3: k = 9223372036854775808 See http://python-future.org/compatible_idioms.html#long-integers
* Python 2/3 division compatabilityRadostin Stoyanov2018-01-271-6/+6
| | | | | | | | | | | | | | | | | | 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/
* progress: Don't overwrite "format"Radostin Stoyanov2017-10-201-4/+4
| | | | | | Do not overwrite built-in format. [1] https://docs.python.org/2/library/functions.html#format
* progress: Remove unused importRadostin Stoyanov2017-10-201-1/+0
|
* pycodestyle: Use isinstance() for type checkingRadostin Stoyanov2017-10-201-1/+1
| | | | | | | | | | | | | | | | | | | 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
* progress: Remove trailing white spaceRadostin Stoyanov2017-10-201-17/+17
|
* Drop use of python2 long() syntaxCole Robinson2017-05-051-1/+1
| | | | Plus one more python3 syntax issue
* Copy urlgrabber progress bar code into virt-manager.gitCole Robinson2015-09-181-0/+496
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).