Пример #1
0
 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
Пример #2
0
    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)
Пример #3
0
    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)
Пример #4
0
 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
Пример #5
0
    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)
Пример #6
0
 def _callFUT(self):
     from gcloud._helpers import _get_production_project
     return _get_production_project()
Пример #7
0
 def _callFUT(self):
     from gcloud._helpers import _get_production_project
     return _get_production_project()