File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44"""
55module comment
66"""
7- import botocore
7+ from botocore . exceptions import ClientError
88import datetime
99import socket
1010import time
@@ -107,7 +107,7 @@ def send_heartbeat(self, lock):
107107 # attribute_exists(#pk) AND attribute_exists(#sk) AND #rvn = :rvn AND #on = :on
108108 # attribute-names
109109 # attribute-values
110- except botocore . exceptions . ClientError as e :
110+ except ClientError as e :
111111 if e .response ['Error' ]['Code' ] == 'ConditionalCheckFailedException' :
112112 # TODO: need to handle the case where the lock was "stolen" by someone else...
113113 print
@@ -155,7 +155,7 @@ def release_lock(self,
155155 # attribute_exists(#pk) AND attribute_exists(#sk) AND #rvn = :rvn AND #on = :on
156156 # attribute-names
157157 # attribute-values
158- except botocore . exceptions . ClientError as e :
158+ except ClientError as e :
159159 if e .response ['Error' ]['Code' ] == 'ConditionalCheckFailedException' :
160160 # TODO: need to handle the case where the lock was "stolen" by someone else...
161161 print
You can’t perform that action at this time.
0 commit comments