Execute googleclient commands in datastore creation check
This commit is contained in:
+2
-2
@@ -96,14 +96,14 @@ def main():
|
|||||||
try:
|
try:
|
||||||
googleClient.users().dataSources().get(
|
googleClient.users().dataSources().get(
|
||||||
userId='me',
|
userId='me',
|
||||||
dataSourceId=dataSourceId)
|
dataSourceId=dataSourceId).execute()
|
||||||
except HttpError, error:
|
except HttpError, error:
|
||||||
if not 'DataSourceId not found' in str(error):
|
if not 'DataSourceId not found' in str(error):
|
||||||
raise error
|
raise error
|
||||||
# Doesn't exist, so create it.
|
# Doesn't exist, so create it.
|
||||||
googleClient.users().dataSources().create(
|
googleClient.users().dataSources().create(
|
||||||
userId='me',
|
userId='me',
|
||||||
body=dataSource)
|
body=dataSource).execute()
|
||||||
|
|
||||||
datasetId = '%s-%s' % (minLogNs, maxLogNs)
|
datasetId = '%s-%s' % (minLogNs, maxLogNs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user