From 99cac32ced63640decf95df55fd4adffa3f67e52 Mon Sep 17 00:00:00 2001 From: nolash Date: Tue, 4 Jan 2022 17:10:19 +0000 Subject: [PATCH] Allow for query string in rpc url --- chainlib/connection.py | 5 ++++- setup.cfg | 5 +---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chainlib/connection.py b/chainlib/connection.py index b56b403..309f12b 100644 --- a/chainlib/connection.py +++ b/chainlib/connection.py @@ -133,6 +133,9 @@ class RPCConnection: self.location = os.path.join('{}://'.format(url_parsed.scheme), location) self.location = urljoin(self.location, url_parsed.path) + if url_parsed.query != '': + self.location = urljoin(self.location, '?' + url_parsed.query) + logg.debug('parsed url {} to location {}'.format(url, self.location)) @@ -319,7 +322,7 @@ class JSONRPCHTTPConnection(HTTPConnection): ) ho = build_opener(handler) install_opener(ho) - + try: r = urlopen( req, diff --git a/setup.cfg b/setup.cfg index 156ad40..280927c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,12 +1,9 @@ -; Config::Simple 4.59 -; Mon Nov 8 05:19:17 2021 - [metadata] name=chainlib license=WTFPL2 author_email=dev@holbrook.no description=Generic blockchain access library and tooling -version=0.0.14 +version=0.0.15 url=https://gitlab.com/chaintools/chainlib author=Louis Holbrook