Execute googleclient commands in datastore creation check

This commit is contained in:
Chris Anderson
2015-07-19 21:34:34 -05:00
parent 575d9f275b
commit 09e7191fef
+2 -2
View File
@@ -96,14 +96,14 @@ def main():
try:
googleClient.users().dataSources().get(
userId='me',
dataSourceId=dataSourceId)
dataSourceId=dataSourceId).execute()
except HttpError, error:
if not 'DataSourceId not found' in str(error):
raise error
# Doesn't exist, so create it.
googleClient.users().dataSources().create(
userId='me',
body=dataSource)
body=dataSource).execute()
datasetId = '%s-%s' % (minLogNs, maxLogNs)