raiseValueError("The current size of the file is {} bytes, which is not matching the expected value of {} bytes".format(CURRENT_FILE_SIZE,EXPECTED_ED25519_FILE_SIZE))
raiseValueError(("The current size of the file is {} bytes, "
"which is not matching the expected value of "
"{} bytes").format(CURRENT_FILE_SIZE,
EXPECTED_ED25519_FILE_SIZE))
else:
withopen(key_file,'rb')asf:
ED25519_KEY_POSITION=32
@@ -884,18 +892,21 @@ class LocalNodeController(NodeController):
raiseValueError("The current length of the key is {}, which is not matching the expected length of {}".format(CURRENT_ED25519_BASE64_KEY_SIZE,EXPECTED_ED25519_BASE64_KEY_SIZE))
if (CURRENT_ED25519_BASE64_KEY_SIZE!=
EXPECTED_ED25519_BASE64_KEY_SIZE):
raiseValueError(("The current length of the key is {}, "
"which is not matching the expected "
"length of {}")
.format(CURRENT_ED25519_BASE64_KEY_SIZE,
EXPECTED_ED25519_BASE64_KEY_SIZE))
else:
self._env['ed25519_id']=ed25519_id
def__init__(self,env):
NodeController.__init__(self,env)
self._env=env
#print('abcd')
self._setEd25519Id()
defgetNick(self):
@@ -912,7 +923,6 @@ class LocalNodeController(NodeController):
defgetEd25519Id(self):
"""Return the value of ed25519 key"""
try:
#self._setEd25519Id()
returnself._env['ed25519_id']
exceptKeyError:
returnNone
@@ -1358,7 +1368,8 @@ class LocalNodeController(NodeController):
defgetNodeDirInfoStatusPattern(self,dir_format):
"""Returns a regular expression pattern for finding this node's entry
in a dir_format file. Returns None if the requested pattern is not available.
in a dir_format file. Returns None if the requested pattern is not
available.
"""
nickname=self.getNick()
ed25519_key=self.getEd25519Id()
@@ -1374,10 +1385,9 @@ class LocalNodeController(NodeController):
assertconsordescormd
ifcons:
# Disabled due to bug #33407: chutney bridge authorities don't publish
# bridge descriptors in the bridge networkstatus file
# Disabled due to bug #33407: chutney bridge authorities don't
# publish bridge descriptors in the bridge networkstatus file
ifdir_format=="br_status":
# Not yet implemented
returnNone
else:
# ns_cons and md_cons work
@@ -1385,8 +1395,6 @@ class LocalNodeController(NodeController):