fixed try/except/finally to be 2.4 compatible
This commit is contained in:
parent
8ab439498c
commit
d501f50c7b
1 changed files with 53 additions and 50 deletions
|
@ -234,6 +234,7 @@ class LocalSocketThread(Thread):
|
|||
data = ""
|
||||
while "\n" not in data:
|
||||
data += conn.recv(2048)
|
||||
try:
|
||||
try:
|
||||
new_key = AesKey.Read(data.strip())
|
||||
found = False
|
||||
|
@ -587,6 +588,7 @@ def daemonize(module, password, port, timeout, minutes, use_ipv6, pid_file):
|
|||
daemonize_self(module, password, port, minutes, pid_file)
|
||||
|
||||
def timer_handler(signum, _):
|
||||
try:
|
||||
try:
|
||||
server.last_event_lock.acquire()
|
||||
td = datetime.now() - server.last_event
|
||||
|
@ -703,6 +705,7 @@ def main():
|
|||
if daemon_running and multi_key:
|
||||
# try to connect to the file socket for the daemon if it exists
|
||||
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||
try:
|
||||
try:
|
||||
s.connect(SOCKET_FILE)
|
||||
s.sendall(password + '\n')
|
||||
|
|
Loading…
Reference in a new issue