From ad8058b6393b83cb761d32a98d1a81758ce4f881 Mon Sep 17 00:00:00 2001 From: aayush reddy Date: Tue, 19 Jun 2018 12:50:53 +0530 Subject: [PATCH] did typecasting to avoid exception changed the variables conf.port, key. HASHDB_MILESTONE_VALUE to string so that the exception wont raise.. --- lib/core/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index a439ba896..81bb90064 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4281,7 +4281,7 @@ def hashDBWrite(key, value, serialize=False): Helper function for writing session data to HashDB """ - _ = '|'.join((conf.hostname, conf.path.strip('/') if conf.path is not None else str(conf.port), key, HASHDB_MILESTONE_VALUE)) + _ = '|'.join((conf.hostname, conf.path.strip('/') if conf.path is not None else str(conf.port), str(key), str(HASHDB_MILESTONE_VALUE))) conf.hashDB.write(_, value, serialize) def hashDBRetrieve(key, unserialize=False, checkConf=False): @@ -4289,7 +4289,7 @@ def hashDBRetrieve(key, unserialize=False, checkConf=False): Helper function for restoring session data from HashDB """ - _ = '|'.join((conf.hostname, conf.path.strip('/') if conf.path is not None else str(conf.port), key, HASHDB_MILESTONE_VALUE)) + _ = '|'.join((conf.hostname, conf.path.strip('/') if conf.path is not None else str(conf.port), str(key), str(HASHDB_MILESTONE_VALUE))) retVal = conf.hashDB.retrieve(_, unserialize) if kb.resumeValues and not (checkConf and any((conf.flushSession, conf.freshQueries))) else None if not kb.inferenceMode and not kb.fileReadMode and isinstance(retVal, basestring) and any(_ in retVal for _ in (PARTIAL_VALUE_MARKER, PARTIAL_HEX_VALUE_MARKER)):