MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / worker

Function worker

Scripts/ButSystem.py:538–565  ·  view source on GitHub ↗

worker. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.

()

Source from the content-addressed store, hash-verified

536 if file_storage is None:
537 return None
538 try:
539 cl = getattr(file_storage, "content_length", None)
540 if cl is not None:
541 cl = int(cl)
542 if cl >= 0:
543 return cl
544 except Exception:
545 pass
546 try:
547 s = getattr(file_storage, "stream", None)
548 if s is None:
549 return None
550 pos = None
551 try:
552 pos = s.tell()
553 except Exception:
554 pos = None
555 try:
556 s.seek(0, os.SEEK_END)
557 size = int(s.tell())
558 finally:
559 try:
560 if pos is None:
561 s.seek(0)
562 else:
563 s.seek(pos)
564 except Exception:
565 pass
566 return size
567 except Exception:
568 return None

Callers

nothing calls this directly

Calls 1

aesgcm_encrypt_streamFunction · 0.70

Tested by

no test coverage detected