From 96219c81ab7925c050848ce5cafabbfa6afa8e5b Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 12 Apr 2019 18:45:22 -0500 Subject: [PATCH] minor bug fixes --- onionr/onionrblockapi.py | 2 +- onionr/static-data/default-plugins/clandestine/main.py | 3 +-- .../static-data/default-plugins/metadataprocessor/main.py | 3 --- requirements.in | 3 ++- requirements.txt | 7 +++---- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/onionr/onionrblockapi.py b/onionr/onionrblockapi.py index 1f890bcc..df17aa40 100755 --- a/onionr/onionrblockapi.py +++ b/onionr/onionrblockapi.py @@ -90,7 +90,7 @@ class Block: try: if self.core._utils.getEpoch() - self.core.getBlockDate(self.hash) < 60: assert self.core._crypto.replayTimestampValidation(self.bmetadata['rply']) - except (AssertionError, KeyError) as e: + except (AssertionError, KeyError, TypeError) as e: if not self.bypassReplayCheck: # Zero out variables to prevent reading of replays self.bmetadata = {} diff --git a/onionr/static-data/default-plugins/clandestine/main.py b/onionr/static-data/default-plugins/clandestine/main.py index 8f202dac..17007f0e 100755 --- a/onionr/static-data/default-plugins/clandestine/main.py +++ b/onionr/static-data/default-plugins/clandestine/main.py @@ -26,9 +26,8 @@ from onionrservices import bootstrapservice plugin_name = 'clandestine' PLUGIN_VERSION = '0.0.0' - sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) -from . import controlapi, peerserver +import controlapi, peerserver flask_blueprint = controlapi.flask_blueprint direct_blueprint = peerserver.direct_blueprint diff --git a/onionr/static-data/default-plugins/metadataprocessor/main.py b/onionr/static-data/default-plugins/metadataprocessor/main.py index 787b0174..346600ff 100755 --- a/onionr/static-data/default-plugins/metadataprocessor/main.py +++ b/onionr/static-data/default-plugins/metadataprocessor/main.py @@ -45,9 +45,6 @@ def on_processblocks(api, data=None): # Generally fired by utils. myBlock = api.data['block'] blockType = api.data['type'] - logger.info('blockType is ' + blockType) - utils = api.get_utils() - core = api.get_core() # Process specific block types diff --git a/requirements.in b/requirements.in index 7bf8ff02..014499dd 100755 --- a/requirements.in +++ b/requirements.in @@ -6,4 +6,5 @@ defusedxml==0.5.0 Flask==1.0.2 PySocks==1.6.8 stem==1.7.1 -deadsimplekv==0.0.1 \ No newline at end of file +deadsimplekv==0.0.1 +jinja2==2.10.1 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 9bb58ea1..de720793 100644 --- a/requirements.txt +++ b/requirements.txt @@ -107,10 +107,9 @@ itsdangerous==1.1.0 \ --hash=sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19 \ --hash=sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749 \ # via flask -jinja2==2.10 \ - --hash=sha256:74c935a1b8bb9a3947c50a54766a969d4846290e1e788ea44c1392163723c3bd \ - --hash=sha256:f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4 \ - # via flask +jinja2==2.10.1 \ + --hash=sha256:065c4f02ebe7f7cf559e49ee5a95fb800a9e4528727aec6f24402a5374c65013 \ + --hash=sha256:14dd6caf1527abb21f08f86c784eac40853ba93edb79552aa1e4b8aef1b61c7b markupsafe==1.1.1 \ --hash=sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473 \ --hash=sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161 \