Skip to content

Commit

Permalink
Update DLP redact image code sample region to include mimetype import…
Browse files Browse the repository at this point in the history
… [(#1928)](GoogleCloudPlatform/python-docs-samples#1928)

In response to feedback where a user was confused that the mimetype
import was missing from the code sample in the documentation.
  • Loading branch information
djmailhot authored and engelke committed Jan 25, 2019
1 parent 33d3152 commit f113c2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions samples/snippets/redact.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
from __future__ import print_function

import argparse
# [START dlp_redact_image]
import mimetypes
# [END dlp_redact_image]
import os


# [START dlp_redact_image]

def redact_image(project, filename, output_filename,
info_types, min_likelihood=None, mime_type=None):
"""Uses the Data Loss Prevention API to redact protected data in an image.
Expand Down

0 comments on commit f113c2e

Please sign in to comment.