Skip to content

Commit

Permalink
queue and queue_empty were removed from minio-py in 6.0 (#948)
Browse files Browse the repository at this point in the history
  • Loading branch information
ephes authored Aug 3, 2020
1 parent 3d4a347 commit dd0643e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import sys
import time
from threading import Thread
from queue import Queue, Empty

from minio.compat import queue, queue_empty

_BAR_SIZE = 20
_KILOBYTE = 1024
Expand Down Expand Up @@ -67,7 +67,7 @@ def __init__(self, interval=1, stdout=sys.stdout):
self.last_printed_len = 0
self.current_size = 0

self.display_queue = queue()
self.display_queue = Queue()
self.initial_time = time.time()
self.stdout = stdout
self.start()
Expand All @@ -89,7 +89,7 @@ def run(self):
try:
# display every interval secs
task = self.display_queue.get(timeout=self.interval)
except queue_empty:
except Empty:
elapsed_time = time.time() - self.initial_time
if elapsed_time > displayed_time:
displayed_time = elapsed_time
Expand Down

0 comments on commit dd0643e

Please sign in to comment.