Skip to content

Commit b8b398b

Browse files
committed
Hopefully this shall pass python2 and python3
1 parent 09dc78a commit b8b398b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bigquery/client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
from googleapiclient.errors import HttpError
1616
from httplib2 import Http
1717

18+
if sys.version_info >= (3, 0):
19+
basestring = str
20+
1821
BIGQUERY_SCOPE = [
1922
'https://www.googleapis.com/auth/bigquery'
2023
]
@@ -124,7 +127,7 @@ def get_client(project_id=None, credentials=None,
124127

125128
if private_key:
126129
try:
127-
if isinstance(private_key, str):
130+
if isinstance(private_key, basestring):
128131
private_key = private_key.decode('utf-8')
129132
except NameError:
130133
# python3 -- private_key is already unicode

0 commit comments

Comments
 (0)