Lint: E302 expected 2 blank lines, found X
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
|
||||
import uuid
|
||||
|
||||
|
||||
# Child list function
|
||||
def listchildren(zk_conn, key):
|
||||
try:
|
||||
@ -30,6 +31,7 @@ def listchildren(zk_conn, key):
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
# Key deletion function
|
||||
def deletekey(zk_conn, key, recursive=True):
|
||||
try:
|
||||
@ -38,6 +40,7 @@ def deletekey(zk_conn, key, recursive=True):
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# Data read function
|
||||
def readdata(zk_conn, key):
|
||||
try:
|
||||
@ -47,6 +50,7 @@ def readdata(zk_conn, key):
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
# Data write function
|
||||
def writedata(zk_conn, kv):
|
||||
# Commit the transaction
|
||||
@ -87,6 +91,7 @@ def writedata(zk_conn, kv):
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# Key rename function
|
||||
def renamekey(zk_conn, kv):
|
||||
# This one is not transactional because, inexplicably, transactions don't
|
||||
@ -133,6 +138,7 @@ def renamekey(zk_conn, kv):
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
# Write lock function
|
||||
def writelock(zk_conn, key):
|
||||
count = 1
|
||||
@ -149,6 +155,7 @@ def writelock(zk_conn, key):
|
||||
continue
|
||||
return lock
|
||||
|
||||
|
||||
# Read lock function
|
||||
def readlock(zk_conn, key):
|
||||
count = 1
|
||||
@ -165,6 +172,7 @@ def readlock(zk_conn, key):
|
||||
continue
|
||||
return lock
|
||||
|
||||
|
||||
# Exclusive lock function
|
||||
def exclusivelock(zk_conn, key):
|
||||
count = 1
|
||||
|
Reference in New Issue
Block a user