mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
CI: use getConnection() to simplify code
This commit is contained in:
@@ -73,12 +73,8 @@ class Module_UE:
|
||||
def _command(self, cmd, silent = False):
|
||||
if cmd is None:
|
||||
raise Exception("no command provided")
|
||||
if self.host == "" or self.host == "localhost":
|
||||
c = cls_cmd.LocalCmd()
|
||||
else:
|
||||
c = cls_cmd.RemoteCmd(self.host)
|
||||
response = c.run(cmd, silent=silent)
|
||||
c.close()
|
||||
with cls_cmd.getConnection(self.host) as c:
|
||||
response = c.run(cmd, silent=silent)
|
||||
return response
|
||||
|
||||
#-----------------$
|
||||
|
||||
Reference in New Issue
Block a user