示例#1
0
 def check_version(self):
     if self.version < base.OLDEST_SUPPORTED_VERSION:
         raise exceptions.ClientError(
             "Version %s unsupported, must be %s or higher" %
             (utils.version_str(self.version),
              utils.version_str(base.OLDEST_SUPPORTED_VERSION)))
     return
示例#2
0
 def check_version(self):
     if (self.model_class.min_version > OLDEST_SUPPORTED_VERSION
             and self.client.version < self.model_class.min_version):
         min_version = utils.version_str(self.model_class.min_version)
         curr_version = utils.version_str(self.client.version)
         raise exceptions.ClientError(
             message="Cannot access %s in version %s, it was added in "
             "version %s" % (self.url, curr_version, min_version))