Skip to content

Commit

Permalink
Merge pull request #208 from DeliZhangX/private/deliz/CA-382842
Browse files Browse the repository at this point in the history
CA-382842: Fix issue of "Connection refused"
  • Loading branch information
DeliZhangX authored Sep 21, 2023
2 parents 1bc5e48 + 021f6f4 commit aafc94c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion autocertkit/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ def run_cmd_ext(self, cmd):

with open(f'/tmp/{fcmd}', 'w') as f:
f.write(cmd)
self.put_file(f'/tmp/{fcmd}')
res = self.put_file(f'/tmp/{fcmd}')
if res['returncode']:
os.remove(f'/tmp/{fcmd}')
raise Exception(f'{SCP} failed, maybe {self.ip} is not yet ready.')

self.run_cmd(fr'sh {fcmd} >{fout} 2>{ferr}; echo "$?" >{frc}')

Expand Down

0 comments on commit aafc94c

Please sign in to comment.