File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ async def entrypoint(args):
126
126
print (f"Saving to { str (download_path )} " )
127
127
128
128
try :
129
- timeout = aiohttp .ClientTimeout (total = None ) # Turn off timeout
130
- async with aiohttp .ClientSession (timeout = timeout ) as session :
129
+ client_timeout = aiohttp .ClientTimeout (total = args . timeout ) # Turn off timeout
130
+ async with aiohttp .ClientSession (timeout = client_timeout ) as session :
131
131
tasks = []
132
132
print (f"Starting download for { args .repo_id } " )
133
133
@@ -194,7 +194,8 @@ async def entrypoint(args):
194
194
"Skips all sanity checks such as "
195
195
"checking if the destination directory exists"
196
196
),
197
- )
197
+ ),
198
+ parser .add_argument ("--timeout" , type = int , help = "Optional request timeout in seconds" )
198
199
199
200
args = parser .parse_args ()
200
201
You can’t perform that action at this time.
0 commit comments