diff --git a/clicada/cli/arg.py b/clicada/cli/arg.py index 1b8cabd..dde7052 100644 --- a/clicada/cli/arg.py +++ b/clicada/cli/arg.py @@ -82,9 +82,10 @@ class CmdCtrl: self.rpc = chainlib.eth.cli.Rpc() self.__conn = self.rpc.connect_by_config(self.config) - self.remote_openers = { - 'meta': HTTPSession(self.get('META_URL'), auth=self.__auth), - } + + self.remote_openers = {} + if self.get('META_URL') != None: + self.remote_openers['meta'] = HTTPSession(self.get('META_URL'), auth=self.__auth) def auth(self, typ): diff --git a/clicada/cli/tag.py b/clicada/cli/tag.py index 0f1f5a4..cbb1312 100644 --- a/clicada/cli/tag.py +++ b/clicada/cli/tag.py @@ -36,6 +36,6 @@ def validate(config, args): def execute(ctrl): store_path = '.clicada' - user_store = FileUserStore(ctrl.chain(), ctrl.get('_CATEGORY'), store_path, int(ctrl.get('FILESTORE_TTL'))) + user_store = FileUserStore(None, ctrl.chain(), ctrl.get('_CATEGORY'), store_path, int(ctrl.get('FILESTORE_TTL'))) user_store.put(ctrl.get('_IDENTIFIER'), json.dumps(ctrl.get('_TAG')), force=True) user_store.stick(ctrl.get('_IDENTIFIER')) diff --git a/clicada/cli/user.py b/clicada/cli/user.py index 2080e22..9768912 100644 --- a/clicada/cli/user.py +++ b/clicada/cli/user.py @@ -6,7 +6,6 @@ import datetime # external imports from cic_eth_registry import CICRegistry from cic_eth_registry.lookup.tokenindex import TokenIndexLookup -from cic_types.ext.metadata import MetadataRequestsHandler from cic_types.models.person import Person from chainlib.eth.address import to_checksum_address from hexathon import add_0x @@ -51,8 +50,6 @@ def validate(config, args): def execute(ctrl): tx_getter = TxGetter(ctrl.get('TX_CACHE_URL')) - MetadataRequestsHandler.base_url = ctrl.get('META_URL') - store_path = '.clicada' user_phone_file_label = 'phone' user_phone_store = FileUserStore(ctrl.opener('meta'), ctrl.chain(), user_phone_file_label, store_path, int(ctrl.get('FILESTORE_TTL'))) diff --git a/clicada/user/file.py b/clicada/user/file.py index 3090c4e..99e4ae0 100644 --- a/clicada/user/file.py +++ b/clicada/user/file.py @@ -211,7 +211,6 @@ class FileUserStore: try: person_data = person.deserialize(person_data=v) except Exception as e: - logg.error('e {}'.format(e)) person_data = v return person_data except FileNotFoundError: