@@ -48,6 +48,7 @@ def numerical_risk_analysis(
48
48
Returns:
49
49
None; the response from the API is printed to the terminal.
50
50
"""
51
+ import concurrent .futures
51
52
52
53
# Import the client library.
53
54
import google .cloud .dlp
@@ -116,7 +117,7 @@ def callback(message):
116
117
117
118
try :
118
119
subscription .result (timeout = timeout )
119
- except TimeoutError :
120
+ except concurrent . futures . TimeoutError :
120
121
print (
121
122
"No event received before the timeout. Please verify that the "
122
123
"subscription provided is subscribed to the topic provided."
@@ -156,6 +157,7 @@ def categorical_risk_analysis(
156
157
Returns:
157
158
None; the response from the API is printed to the terminal.
158
159
"""
160
+ import concurrent .futures
159
161
160
162
# Import the client library.
161
163
import google .cloud .dlp
@@ -237,7 +239,7 @@ def callback(message):
237
239
238
240
try :
239
241
subscription .result (timeout = timeout )
240
- except TimeoutError :
242
+ except concurrent . futures . TimeoutError :
241
243
print (
242
244
"No event received before the timeout. Please verify that the "
243
245
"subscription provided is subscribed to the topic provided."
@@ -277,6 +279,7 @@ def k_anonymity_analysis(
277
279
Returns:
278
280
None; the response from the API is printed to the terminal.
279
281
"""
282
+ import concurrent .futures
280
283
281
284
# Import the client library.
282
285
import google .cloud .dlp
@@ -367,7 +370,7 @@ def callback(message):
367
370
368
371
try :
369
372
subscription .result (timeout = timeout )
370
- except TimeoutError :
373
+ except concurrent . futures . TimeoutError :
371
374
print (
372
375
"No event received before the timeout. Please verify that the "
373
376
"subscription provided is subscribed to the topic provided."
@@ -409,6 +412,7 @@ def l_diversity_analysis(
409
412
Returns:
410
413
None; the response from the API is printed to the terminal.
411
414
"""
415
+ import concurrent .futures
412
416
413
417
# Import the client library.
414
418
import google .cloud .dlp
@@ -509,7 +513,7 @@ def callback(message):
509
513
510
514
try :
511
515
subscription .result (timeout = timeout )
512
- except TimeoutError :
516
+ except concurrent . futures . TimeoutError :
513
517
print (
514
518
"No event received before the timeout. Please verify that the "
515
519
"subscription provided is subscribed to the topic provided."
@@ -558,6 +562,7 @@ def k_map_estimate_analysis(
558
562
Returns:
559
563
None; the response from the API is printed to the terminal.
560
564
"""
565
+ import concurrent .futures
561
566
562
567
# Import the client library.
563
568
import google .cloud .dlp
@@ -659,7 +664,7 @@ def callback(message):
659
664
660
665
try :
661
666
subscription .result (timeout = timeout )
662
- except TimeoutError :
667
+ except concurrent . futures . TimeoutError :
663
668
print (
664
669
"No event received before the timeout. Please verify that the "
665
670
"subscription provided is subscribed to the topic provided."
0 commit comments