File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 21
21
22
22
from collections import defaultdict
23
23
from functools import partial
24
+ from multiprocessing import TimeoutError
24
25
from time import sleep
25
26
from time import time
26
27
@@ -65,6 +66,8 @@ class WindowsError(Exception):
65
66
from scancode .interrupt import DEFAULT_TIMEOUT
66
67
from scancode .interrupt import fake_interruptible
67
68
from scancode .interrupt import interruptible
69
+ from scancode .pool import ScanCodeTimeoutError
70
+
68
71
69
72
# Tracing flags
70
73
TRACE = False
@@ -1296,7 +1299,10 @@ def scan_codebase(
1296
1299
else :
1297
1300
setattr (resource , key , value )
1298
1301
codebase .save_resource (resource )
1299
-
1302
+ except (TimeoutError , ScanCodeTimeoutError ):
1303
+ codebase .errors .append ("Timeout waiting for resource. Path unknown." )
1304
+ success = False
1305
+ continue
1300
1306
except StopIteration :
1301
1307
break
1302
1308
except KeyboardInterrupt :
You can’t perform that action at this time.
0 commit comments