8000 Remove unnecessary try-catch block - all findings in this examnple sh… · jlmwise/python-docs-samples@69f2e4c · GitHub
[go: up one dir, main page]

Skip to content

Commit 69f2e4c

Browse files
committed
Remove unnecessary try-catch block - all findings in this examnple should have quotes.
1 parent bbd2937 commit 69f2e4c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

dlp/inspect_content.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@ def inspect_string_basic(
6666
# Print out the results.
6767
if response.result.findings:
6868
for finding in response.result.findings:
69-
try:
70-
if finding.quote:
71-
print("Quote: {}".format(finding.quote))
72-
except AttributeError:
73-
pass
69+
print("Quote: {}".format(finding.quote))
7470
print("Info type: {}".format(finding.info_type.name))
7571
print("Likelihood: {}".format(finding.likelihood))
7672
else:

0 commit comments

Comments
 (0)
0