Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
Queue is not iterable, use Queue.queue
  • Loading branch information
RaSan147 committed Apr 5, 2024
1 parent 9684846 commit 5bbd5e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dev_src/_fs_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def kill(self):
self.active = False
self.done = True

for f in tuple(self.serial_io):
for f in tuple(self.serial_io.queue):
name = f[0].name
if not f[0].closed:
f[0].close()
Expand Down
2 changes: 1 addition & 1 deletion dev_src/local_server_pyrobox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ def remove_from_temp(temp_fn):

if upload_handler.error and not upload_handler.active:
remove_from_temp(temp_fn)
return self.send_error(upload_handler.error, HTTPStatus.INTERNAL_SERVER_ERROR, cookie=cookie)
return self.send_error(HTTPStatus.INTERNAL_SERVER_ERROR, upload_handler.error, cookie=cookie)



Expand Down
8 changes: 4 additions & 4 deletions dev_src/pyroboxCore.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import atexit
import os

__version__ = "0.9.4"
__version__ = "0.9.5"
enc = "utf-8"
__all__ = [
"HTTPServer", "ThreadingHTTPServer", "BaseHTTPRequestHandler",
Expand Down Expand Up @@ -1684,7 +1684,7 @@ def get(self, show=F, strip=F, Timeout=10, chunk_size=0):
if chunk_size <= 0:
chunk_size = self.remainbytes

waited = 0
# waited = 0
for _ in range(Timeout*2):
if self.is_multipart():
line = req.rfile.readline()
Expand All @@ -1693,8 +1693,8 @@ def get(self, show=F, strip=F, Timeout=10, chunk_size=0):
if line:
break
time.sleep(.5)
waited +=.5
print(f"Waited for {waited}s")
# waited +=.5
# print(f"Waited for {waited}s")
else:
raise ConnectionAbortedError

Expand Down

0 comments on commit 5bbd5e3

Please sign in to comment.