def main(uri): # type: (Text) -> None api = StrictIota(uri) try: node_info = api.get_node_info() except ConnectionError as e: print("Hm. {uri} isn't responding. Is the node running?".format(uri=uri)) print(e) except BadApiResponse as e: print("Looks like {uri} isn't very talkative today ):".format(uri=uri)) print(e) else: print('Hello {uri}!'.format(uri=uri)) pprint(node_info)
def main(uri): # type: (Text) -> None api = StrictIota(uri) try: node_info = api.get_node_info() except NetworkError as e: print("Hm. {uri} isn't responding; is the node running?".format( uri=uri)) print(e) except BadApiResponse as e: print("Looks like {uri} isn't very talkative today ):".format(uri=uri)) print(e) else: print('Hello {uri}!'.format(uri=uri)) pprint(node_info)
def test_nodeinfo(self): #print(__version__) api = StrictIota(self.uri) node_info = api.get_node_info()