Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9469c10

Browse filesBrowse files
committed
Remove quote check because it is now hardcoded
1 parent 7c64468 commit 9469c10
Copy full SHA for 9469c10

File tree

Expand file treeCollapse file tree

3 files changed

+3
-15
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-15
lines changed

‎dlp/dlp_inspect_image_file.py

Copy file name to clipboardExpand all lines: dlp/dlp_inspect_image_file.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ def inspect_image_file(project_id='YOUR_PROJECT_ID',
5151
# Print out the results
5252
if response.result.findings:
5353
for finding in response.result.findings:
54-
try:
55-
if finding.quote:
56-
print('Quote: {}'.format(finding.quote))
57-
except AttributeError:
58-
pass
54+
print('Quote: {}'.format(finding.quote))
5955
print('Info type: {}'.format(finding.info_type.name))
6056
print('Likelihood: {}'.format(finding.likelihood))
6157
else:

‎dlp/dlp_inspect_string.py

Copy file name to clipboardExpand all lines: dlp/dlp_inspect_string.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ def inspect_string(project_id='YOUR_PROJECT_ID'):
4646
# Print out the results
4747
if response.result.findings:
4848
for finding in response.result.findings:
49-
try:
50-
if finding.quote:
51-
print('Quote: {}'.format(finding.quote))
52-
except AttributeError:
53-
pass
49+
print('Quote: {}'.format(finding.quote))
5450
print('Info type: {}'.format(finding.info_type.name))
5551
print('Likelihood: {}'.format(finding.likelihood))
5652
else:

‎dlp/dlp_inspect_text_file.py

Copy file name to clipboardExpand all lines: dlp/dlp_inspect_text_file.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,7 @@ def inspect_text_file(project_id='YOUR_PROJECT_ID',
5151
# Print out the results
5252
if response.result.findings:
5353
for finding in response.result.findings:
54-
try:
55-
if finding.quote:
56-
print('Quote: {}'.format(finding.quote))
57-
except AttributeError:
58-
pass
54+
print('Quote: {}'.format(finding.quote))
5955
print('Info type: {}'.format(finding.info_type.name))
6056
print('Likelihood: {}'.format(finding.likelihood))
6157
else:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.