Fix enum checking

This commit is contained in:
wqy
2022-09-17 18:02:48 +08:00
parent 4350b5d19e
commit 391ea0386c
2 changed files with 2 additions and 2 deletions

View File

@@ -117,7 +117,7 @@ def set_pipe_minor_loss(name: str, id: str, minor_loss: float) -> ChangeSet:
def set_pipe_status(name: str, id: str, status: float) -> ChangeSet:
if status is not PIPE_STATUS_OPEN or status is not PIPE_STATUS_CLOSED or status is not PIPE_STATUS_CV:
if status != PIPE_STATUS_OPEN and status != PIPE_STATUS_CLOSED and status != PIPE_STATUS_CV:
return ChangeSet()
return _set_pipe(name, id, 'status', 'str', str(status))