def __init__(self, project=None): if project is None: project = _get_production_project() if project is None: raise ValueError("Project was not passed and could not be " "determined from the environment.") if not isinstance(project, six.string_types): raise ValueError("Project must be a string.") self.project = project
def __init__(self, project=None, credentials=None, http=None): if project is None: project = _get_production_project() if project is None: raise ValueError('Project was not passed and could not be ' 'determined from the environment.') self.project = project super(JSONClient, self).__init__(credentials=credentials, http=http)
def __init__(self, project=None): if project is None: project = _get_production_project() if project is None: raise ValueError('Project was not passed and could not be ' 'determined from the environment.') if not isinstance(project, six.string_types): raise ValueError('Project must be a string.') self.project = project
def __init__(self, project=None, credentials=None, http=None): if project is None: project = _get_production_project() if project is None: raise ValueError('Project was not passed and could not be ' 'determined from the environment.') self.project = project if credentials is None and http is None: credentials = get_credentials() self.connection = Connection(credentials=credentials, http=http)
def _callFUT(self): from gcloud._helpers import _get_production_project return _get_production_project()