mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 18:01:36 +00:00
Define MAX_GOOGLE_SHEET_CELLS in var.py (#881)
This commit is contained in:
@@ -115,7 +115,7 @@ def _request_with_user_agent(request_method):
|
|||||||
return wrapped_request_method
|
return wrapped_request_method
|
||||||
|
|
||||||
google_auth_httplib2.Request.__call__ = _request_with_user_agent(
|
google_auth_httplib2.Request.__call__ = _request_with_user_agent(
|
||||||
google_auth_httplib2.Request.__call__)
|
google_auth_httplib2.Request.__call__)
|
||||||
google_auth_httplib2.AuthorizedHttp.request = _request_with_user_agent(
|
google_auth_httplib2.AuthorizedHttp.request = _request_with_user_agent(
|
||||||
google_auth_httplib2.AuthorizedHttp.request)
|
google_auth_httplib2.AuthorizedHttp.request)
|
||||||
|
|
||||||
@@ -10640,7 +10640,7 @@ and follow recommend steps to authorize GAM for Drive access.''' % (admin_email)
|
|||||||
cell_count = rows * columns
|
cell_count = rows * columns
|
||||||
data_size = string_file.len
|
data_size = string_file.len
|
||||||
max_sheet_bytes = int(result[u'maxImportSizes'][MIMETYPE_GA_SPREADSHEET])
|
max_sheet_bytes = int(result[u'maxImportSizes'][MIMETYPE_GA_SPREADSHEET])
|
||||||
if cell_count > 2000000 or data_size > max_sheet_bytes:
|
if cell_count > MAX_GOOGLE_SHEET_CELLS or data_size > max_sheet_bytes:
|
||||||
print u'{0}{1}'.format(WARNING_PREFIX, MESSAGE_RESULTS_TOO_LARGE_FOR_GOOGLE_SPREADSHEET)
|
print u'{0}{1}'.format(WARNING_PREFIX, MESSAGE_RESULTS_TOO_LARGE_FOR_GOOGLE_SPREADSHEET)
|
||||||
mimeType = u'text/csv'
|
mimeType = u'text/csv'
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ FN_LAST_UPDATE_CHECK_TXT = u'lastupdatecheck.txt'
|
|||||||
FN_OAUTH2SERVICE_JSON = u'oauth2service.json'
|
FN_OAUTH2SERVICE_JSON = u'oauth2service.json'
|
||||||
FN_OAUTH2_TXT = u'oauth2.txt'
|
FN_OAUTH2_TXT = u'oauth2.txt'
|
||||||
MY_CUSTOMER = u'my_customer'
|
MY_CUSTOMER = u'my_customer'
|
||||||
|
# See https://support.google.com/drive/answer/37603
|
||||||
|
MAX_GOOGLE_SHEET_CELLS = 5000000
|
||||||
SKUS = {
|
SKUS = {
|
||||||
u'1010010001': {
|
u'1010010001': {
|
||||||
u'product': u'101001', u'aliases': [u'identity', u'cloudidentity'], u'displayName': 'Cloud Identity'},
|
u'product': u'101001', u'aliases': [u'identity', u'cloudidentity'], u'displayName': 'Cloud Identity'},
|
||||||
|
|||||||
Reference in New Issue
Block a user