You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/04/21 05:45:24 UTC

[13/14] libcloud git commit: Update ecs.py

Update ecs.py

fix for code review

Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/60eafe19
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/60eafe19
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/60eafe19

Branch: refs/heads/trunk
Commit: 60eafe19e2fbbb46415b585013752d0800c3a7ff
Parents: e4b2e33
Author: Jaren <sn...@126.com>
Authored: Thu Apr 6 12:59:21 2017 +0800
Committer: GitHub <no...@github.com>
Committed: Thu Apr 6 12:59:21 2017 +0800

----------------------------------------------------------------------
 libcloud/compute/drivers/ecs.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/60eafe19/libcloud/compute/drivers/ecs.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/drivers/ecs.py b/libcloud/compute/drivers/ecs.py
index 06b6f7d..e92d467 100644
--- a/libcloud/compute/drivers/ecs.py
+++ b/libcloud/compute/drivers/ecs.py
@@ -889,8 +889,8 @@ class ECSDriver(NodeDriver):
         if group_id is None:
             raise AttributeError('group_id is required')
 
-        if (node.state != NodeState.RUNNING) and \
-           (node.state != NodeState.STOPPED):
+        if node.state != NodeState.RUNNING and \
+           node.state != NodeState.STOPPED:
             raise LibcloudError('The node state with id % s need\
                                 be running or stopped .' % node.id)
 
@@ -917,8 +917,8 @@ class ECSDriver(NodeDriver):
         if group_id is None:
             raise AttributeError('group_id is required')
 
-        if (node.state != NodeState.RUNNING) and \
-           (node.state != NodeState.STOPPED):
+        if node.state != NodeState.RUNNING and \
+           node.state != NodeState.STOPPED:
             raise LibcloudError('The node state with id % s need\
                                 be running or stopped .' % node.id)