zrb 1.6.1__py3-none-any.whl → 1.6.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
zrb/util/cmd/command.py
CHANGED
@@ -64,11 +64,25 @@ async def run_command(
|
|
64
64
|
stream, print_method: Callable[..., None], max_lines: int
|
65
65
|
) -> str:
|
66
66
|
lines = []
|
67
|
+
if hasattr(stream, "_limit"):
|
68
|
+
# The limit is set to 10 MB
|
69
|
+
stream._limit = 1024 * 1024 * 10
|
67
70
|
while True:
|
68
|
-
line =
|
71
|
+
line = None
|
72
|
+
try:
|
73
|
+
line = await stream.readline()
|
74
|
+
line = line.decode("utf-8").rstrip()
|
75
|
+
except asyncio.exceptions.CancelledError:
|
76
|
+
break
|
77
|
+
except asyncio.exceptions.LimitOverrunError as e:
|
78
|
+
# Recover by reading a limited chunk instead
|
79
|
+
await stream.read(e.consumed)
|
80
|
+
line = "<output line too long>"
|
81
|
+
except BaseException as e:
|
82
|
+
line = f"Error while reading stream {type(e)} {e}"
|
83
|
+
pass
|
69
84
|
if not line:
|
70
85
|
break
|
71
|
-
line = line.decode("utf-8").rstrip()
|
72
86
|
lines.append(line)
|
73
87
|
if len(lines) > max_lines:
|
74
88
|
lines.pop(0) # Keep only the last max_lines
|
@@ -343,7 +343,7 @@ zrb/util/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
343
343
|
zrb/util/cli/style.py,sha256=D_548KG1gXEirQGdkAVTc81vBdCeInXtnG1gV1yabBA,6655
|
344
344
|
zrb/util/cli/subcommand.py,sha256=umTZIlrL-9g-qc_eRRgdaQgK-whvXK1roFfvnbuY7NQ,1753
|
345
345
|
zrb/util/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
346
|
-
zrb/util/cmd/command.py,sha256=
|
346
|
+
zrb/util/cmd/command.py,sha256=JTbKftqyqkwQLKuHuFe6XLxrrNlqA0uq0Yr0Fg_mjno,5144
|
347
347
|
zrb/util/cmd/remote.py,sha256=NGQq2_IrUMDoZz3qmcgtnNYVGjMHaBKQpZxImf0yfXA,1296
|
348
348
|
zrb/util/codemod/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
349
349
|
zrb/util/codemod/modification_mode.py,sha256=z_4U2gjskEHkFm6UtBe_Wbm-erufYaXgPbdCQ6CZMlw,128
|
@@ -369,7 +369,7 @@ zrb/util/string/name.py,sha256=SXEfxJ1-tDOzHqmSV8kvepRVyMqs2XdV_vyoh_9XUu0,1584
|
|
369
369
|
zrb/util/todo.py,sha256=VGISej2KQZERpornK-8X7bysp4JydMrMUTnG8B0-liI,20708
|
370
370
|
zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
371
371
|
zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
|
372
|
-
zrb-1.6.
|
373
|
-
zrb-1.6.
|
374
|
-
zrb-1.6.
|
375
|
-
zrb-1.6.
|
372
|
+
zrb-1.6.2.dist-info/METADATA,sha256=MOJ6LKW9FeKZmgUusnLuN4oz1Ll2L6rB8B7YZKuaAks,8385
|
373
|
+
zrb-1.6.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
374
|
+
zrb-1.6.2.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
|
375
|
+
zrb-1.6.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|