From 5704edfe4dbd08e18acc2e3f66370d9508efb040 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Tue, 6 Dec 2016 08:54:33 -0800 Subject: [PATCH] Follow-up to #2818, use _to_bytes as intended in BigQuery. --- bigquery/google/cloud/bigquery/_helpers.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bigquery/google/cloud/bigquery/_helpers.py b/bigquery/google/cloud/bigquery/_helpers.py index a8baa2206455..dcea7b237a07 100644 --- a/bigquery/google/cloud/bigquery/_helpers.py +++ b/bigquery/google/cloud/bigquery/_helpers.py @@ -18,8 +18,6 @@ from collections import OrderedDict import datetime -import six - from google.cloud._helpers import _date_from_iso8601_date from google.cloud._helpers import _datetime_from_microseconds from google.cloud._helpers import _datetime_to_rfc3339 @@ -60,8 +58,7 @@ def _string_from_json(value, _): def _bytes_from_json(value, field): """Base64-decode value""" if _not_null(value, field): - return base64.decodestring( - _to_bytes(value) if isinstance(value, six.text_type) else value) + return base64.decodestring(_to_bytes(value)) def _timestamp_from_json(value, field):