@@ -233,6 +233,12 @@ async def handle_device(
233
233
type = bool ,
234
234
help = "Set flag if the device encryption uses https." ,
235
235
)
236
+ @click .option (
237
+ "--timeout" ,
238
+ required = False ,
239
+ default = 15 ,
240
+ help = "Timeout for queries." ,
241
+ )
236
242
@click .option ("--port" , help = "Port override" , type = int )
237
243
async def cli (
238
244
host ,
@@ -250,6 +256,7 @@ async def cli(
250
256
device_family ,
251
257
login_version ,
252
258
port ,
259
+ timeout ,
253
260
):
254
261
"""Generate devinfo files for devices.
255
262
@@ -280,6 +287,7 @@ def capture_raw(discovered: DiscoveredRaw):
280
287
connection_type = connection_type ,
281
288
port_override = port ,
282
289
credentials = credentials ,
290
+ timeout = timeout ,
283
291
)
284
292
device = await Device .connect (config = dc )
285
293
await handle_device (
@@ -301,6 +309,7 @@ def capture_raw(discovered: DiscoveredRaw):
301
309
port_override = port ,
302
310
credentials = credentials ,
303
311
connection_type = ctype ,
312
+ timeout = timeout ,
304
313
)
305
314
if protocol := get_protocol (config ):
306
315
await handle_device (basedir , autosave , protocol , batch_size = batch_size )
@@ -315,6 +324,7 @@ def capture_raw(discovered: DiscoveredRaw):
315
324
credentials = credentials ,
316
325
port = port ,
317
326
discovery_timeout = discovery_timeout ,
327
+ timeout = timeout ,
318
328
on_discovered_raw = capture_raw ,
319
329
)
320
330
discovery_info = raw_discovery [device .host ]
@@ -336,6 +346,7 @@ def capture_raw(discovered: DiscoveredRaw):
336
346
target = target ,
337
347
credentials = credentials ,
338
348
discovery_timeout = discovery_timeout ,
349
+ timeout = timeout ,
339
350
on_discovered_raw = capture_raw ,
340
351
)
341
352
click .echo (f"Detected { len (devices )} devices" )
0 commit comments