milvus/python/sdk/Status.py
Yang Xuan 49fab66b70 feat(python): Add Python SDK APIs
Former-commit-id: 61ddcafcc5b02b0f193ada1fcefdac79d137f1d1
2019-05-30 11:11:41 +08:00

22 lines
398 B
Python

from enum import IntEnum
class Status(IntEnum):
def __new__(cls, code, message=''):
obj = int.__new__(cls, code)
obj._code_ = code
obj.message = message
return obj
def __str__(self):
return str(self.code)
# success
OK = 200, 'OK'
INVALID = 300, 'Invalid'
UNKNOWN = 400, 'Unknown error'
NOT_SUPPORTED = 500, 'Not supported'