Skip to content

Commit

Permalink
Merge pull request googleapis#2822 from dhermes/2818-follow-up
Browse files Browse the repository at this point in the history
Follow-up to googleapis#2818, use _to_bytes as intended in BigQuery.
  • Loading branch information
dhermes authored Dec 6, 2016
2 parents 91bd6dc + 5704edf commit 91d92d6
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 91d92d6

Please sign in to comment.