Skip to content

Commit

Permalink
Follow-up to googleapis#2818, use _to_bytes as intended in BigQuery.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Dec 6, 2016
1 parent 2cd042c commit cf4bce0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bigquery/google/cloud/bigquery/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit cf4bce0

Please sign in to comment.