File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,12 @@ import sys
99from typing import List , BinaryIO
1010
1111try :
12- import resource
13- resource .setrlimit (resource .RLIMIT_NOFILE , (1024 , resource .getrlimit (resource .RLIMIT_NOFILE )))
12+ import resource
13+ soft , hard = resource .getrlimit (resource .RLIMIT_NOFILE )
14+ resource .setrlimit (resource .RLIMIT_NOFILE , (1024 , hard ))
1415except ImportError :
15- # resource module is not avilable on windows
16- pass
16+ # resource module is not available on windows
17+ pass
1718
1819try :
1920 progressbar .streams
Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ import sys
1111import progressbar
1212
1313try :
14- import resource
15- resource .setrlimit (resource .RLIMIT_NOFILE , (1024 , resource .getrlimit (resource .RLIMIT_NOFILE )))
14+ import resource
15+ soft , hard = resource .getrlimit (resource .RLIMIT_NOFILE )
16+ resource .setrlimit (resource .RLIMIT_NOFILE , (1024 , hard ))
1617except ImportError :
17- # resource module is not avilable on windows
18- pass
18+ # resource module is not available on windows
19+ pass
1920
2021from typing import (
2122 List ,
You can’t perform that action at this time.
0 commit comments