コード例 #1
0
ファイル: client.py プロジェクト: coolsvap/gcloud-python
 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
ファイル: client.py プロジェクト: GrimDerp/gcloud-python
    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
ファイル: client.py プロジェクト: nlokare/gcloud-python
    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
ファイル: test__helpers.py プロジェクト: kgruen01/CSSI
 def _callFUT(self):
     from gcloud._helpers import _get_production_project
     return _get_production_project()
コード例 #7
0
ファイル: test__helpers.py プロジェクト: dgaeta/ds_rewrite
 def _callFUT(self):
     from gcloud._helpers import _get_production_project
     return _get_production_project()