mirror of
https://github.com/snovvcrash/usbrip.git
synced 2024-06-01 19:56:09 +02:00
Progressbar (#13)
* Fix grammar 'Shutted down' fixed to 'shut down' * Added progressbar Added tqdm progressbar to time-intensive operations in search_violations() and generate_auth_json() * revert Pipfile.lock to not cause issues with hashes
This commit is contained in:
parent
b2c6011eea
commit
e3ac744ad1
1
Pipfile
1
Pipfile
|
@ -9,6 +9,7 @@ name = "pypi"
|
|||
pip = "==18.0"
|
||||
termcolor = "*"
|
||||
terminaltables = "*"
|
||||
tqdm = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.6"
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
termcolor
|
||||
terminaltables
|
||||
tqdm
|
|
@ -48,6 +48,7 @@ from string import printable
|
|||
|
||||
from terminaltables import AsciiTable, SingleTable
|
||||
from termcolor import colored, cprint
|
||||
from tqdm import tqdm
|
||||
|
||||
import usbrip.lib.core.config as cfg
|
||||
from usbrip.lib.core.common import BULLET
|
||||
|
@ -189,7 +190,7 @@ class USBEvents:
|
|||
attributes = ('vid', 'pid', 'prod', 'manufact', 'serial')
|
||||
|
||||
auth = defaultdict(list)
|
||||
for event in self._events_to_show:
|
||||
for event in tqdm(self._events_to_show):
|
||||
for key, val in event.items():
|
||||
if (key in attributes and
|
||||
val is not None and
|
||||
|
@ -223,7 +224,7 @@ class USBEvents:
|
|||
if not attributes:
|
||||
attributes = auth.keys()
|
||||
|
||||
for event in self._all_events:
|
||||
for event in tqdm(self._all_events):
|
||||
try:
|
||||
if any(
|
||||
event[key] not in vals and
|
||||
|
|
Loading…
Reference in New Issue