whitespace changes
This commit is contained in:
parent
0880229e94
commit
a7422d11c0
5 changed files with 16 additions and 6 deletions
|
|
@ -212,9 +212,12 @@ class Daemon(Lockable):
|
|||
|
||||
def test_socket(self,host,port,timeout=10):
|
||||
import socket
|
||||
try: socket.create_connection((host,port),timeout=timeout).close()
|
||||
except: return False
|
||||
else: return True
|
||||
try:
|
||||
socket.create_connection((host,port),timeout=timeout).close()
|
||||
except:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def wait_for_state(self,req_state):
|
||||
for i in range(300):
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ class Filename(MMGenObject):
|
|||
import stat
|
||||
if stat.S_ISBLK(st.st_mode):
|
||||
mode = (os.O_RDONLY,os.O_RDWR)[bool(write)]
|
||||
if g.platform == 'win': mode |= os.O_BINARY
|
||||
if g.platform == 'win':
|
||||
mode |= os.O_BINARY
|
||||
try:
|
||||
fd = os.open(fn, mode)
|
||||
except OSError as e:
|
||||
|
|
|
|||
|
|
@ -140,11 +140,13 @@ class RPCBackends:
|
|||
|
||||
async def run(self,payload,timeout,wallet):
|
||||
dmsg_rpc('\n RPC PAYLOAD data (httplib) ==>\n{}\n',payload)
|
||||
|
||||
if timeout:
|
||||
import http.client
|
||||
s = http.client.HTTPConnection(self.host,self.port,timeout)
|
||||
else:
|
||||
s = self.session
|
||||
|
||||
try:
|
||||
s.request(
|
||||
method = 'POST',
|
||||
|
|
|
|||
|
|
@ -674,6 +674,7 @@ def get_words_from_user(prompt):
|
|||
return words
|
||||
|
||||
def get_words_from_file(infile,desc,quiet=False):
|
||||
|
||||
if not quiet:
|
||||
qmsg(f'Getting {desc} from file {infile!r}')
|
||||
|
||||
|
|
@ -686,6 +687,7 @@ def get_words_from_file(infile,desc,quiet=False):
|
|||
die(1,f'{capfirst(desc)} data must be UTF-8 encoded.')
|
||||
|
||||
dmsg('Sanitized input: [{}]'.format(' '.join(words)))
|
||||
|
||||
return words
|
||||
|
||||
def get_words(infile,desc,prompt):
|
||||
|
|
|
|||
|
|
@ -881,10 +881,12 @@ class TestSuiteRunner(object):
|
|||
if build:
|
||||
if rerun:
|
||||
for fn in fns:
|
||||
if not root: os.unlink(fn)
|
||||
if not root:
|
||||
os.unlink(fn)
|
||||
if not (dpy and opt.skip_deps):
|
||||
self.run_test(cmd)
|
||||
if not root: do_between()
|
||||
if not root:
|
||||
do_between()
|
||||
else:
|
||||
# If prog produces multiple files:
|
||||
if cmd not in self.rebuild_list or rerun == True:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue