Browse Source

proto.xmr: whitespace

The MMGen Project 2 years ago
parent
commit
aed8600931
4 changed files with 20 additions and 6 deletions
  1. 4 1
      mmgen/proto/xmr/daemon.py
  2. 9 1
      mmgen/proto/xmr/rpc.py
  3. 5 1
      mmgen/xmrwallet.py
  4. 2 3
      test/unit_tests_d/ut_rpc.py

+ 4 - 1
mmgen/proto/xmr/daemon.py

@@ -83,7 +83,10 @@ class MoneroWalletDaemon(RPCDaemon):
 	networks = ('mainnet','testnet')
 	rpc_ports = _nw(13131, 13141, None) # testnet is non-standard
 
-	def __init__(self, proto, wallet_dir,
+	def __init__(
+			self,
+			proto,
+			wallet_dir,
 			test_suite  = False,
 			host        = None,
 			user        = None,

+ 9 - 1
mmgen/proto/xmr/rpc.py

@@ -20,7 +20,15 @@ class MoneroRPCClient(RPCClient):
 	network_proto = 'https'
 	verify_server = False
 
-	def __init__(self,host,port,user,passwd,test_connection=True,proxy=None,daemon=None):
+	def __init__(
+			self,
+			host,
+			port,
+			user,
+			passwd,
+			test_connection       = True,
+			proxy                 = None,
+			daemon                = None ):
 
 		if proxy is not None:
 			self.proxy = IPPort(proxy)

+ 5 - 1
mmgen/xmrwallet.py

@@ -628,7 +628,11 @@ class MoneroWalletOps:
 			super().__init__(uarg_tuple,uopt_tuple)
 
 			host,port = uopt.daemon.split(':') if uopt.daemon else ('localhost',self.wd.daemon_port)
-			self.dc = MoneroRPCClientRaw(host=host, port=int(port), user=None, passwd=None)
+			self.dc = MoneroRPCClient(
+				host   = host,
+				port   = int(port),
+				user   = None,
+				passwd = None )
 			self.accts_data = {}
 
 		async def process_wallet(self,d,fn,last):

+ 2 - 3
test/unit_tests_d/ut_rpc.py

@@ -44,9 +44,6 @@ def cfg_file_auth_test(proto,d,bad_auth=False):
 
 def print_daemon_info(rpc):
 
-	def fmt_dict(d):
-		return '\n        ' + '\n        '.join( pp_fmt(d).split('\n') ) + '\n'
-
 	msg(f"""
     DAEMON VERSION: {rpc.daemon_version} [{rpc.daemon_version_str}]
     CAPS:           {rpc.caps}
@@ -57,6 +54,8 @@ def print_daemon_info(rpc):
 	""".rstrip())
 
 	if rpc.proto.base_proto == 'Bitcoin':
+		def fmt_dict(d):
+			return '\n        ' + '\n        '.join( pp_fmt(d).split('\n') ) + '\n'
 		msg(f"""
     NETWORKINFO:    {fmt_dict(rpc.cached["networkinfo"])}
     BLOCKCHAININFO: {fmt_dict(rpc.cached["blockchaininfo"])}