Skip to content

Commit

Permalink
Merge pull request #539 from medulla-tech/deepsource-transform-efb554f4
Browse files Browse the repository at this point in the history
style: format code with Black and PHP CS Fixer
  • Loading branch information
neoclust authored Dec 6, 2024
2 parents 49cdf6c + 58f55b1 commit 7e37bb7
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions pulse_xmpp_agent/agentxmpp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4339,20 +4339,26 @@ def doTask(

self.config.Port = alternatifconnection[arsconnection]["port"]
self.config.Server = alternatifconnection[arsconnection]["server"]
self.config.guacamole_baseurl = alternatifconnection[arsconnection]["guacamole_baseurl"]
self.config.guacamole_baseurl = alternatifconnection[arsconnection][
"guacamole_baseurl"
]
serverjid = str(arsconnection)
try:
self.config.confdomain = str(arsconnection).split("@")[1].split("/")[0]
self.config.confdomain = (
str(arsconnection).split("@")[1].split("/")[0]
)
except BaseException:
self.config.confdomain = str(serverjid)
changeconnection( conffilename(self.config.agenttype),
self.config.Port,
ipfromdns(self.config.Server),
changeconnection(
conffilename(self.config.agenttype),
self.config.Port,
ipfromdns(self.config.Server),
arsconnection,
self.config.guacamole_baseurl,)
self.config.guacamole_baseurl,
)
self.address = (
ipfromdns(self.config.Server),
int(self.config.Port),
ipfromdns(self.config.Server),
int(self.config.Port),
)
except KeyboardInterrupt:
logging.debug("CTRL+C have been asked.")
Expand All @@ -4365,6 +4371,7 @@ def doTask(
proc.join()
logging.debug("The Pulse Xmpp Agent Relay is now stopped")


class process_xmpp_agent:
def __init__(
self,
Expand Down Expand Up @@ -4537,6 +4544,7 @@ def terminateserver(xmpp):
os.system(cmd)
os._exit(0)


if __name__ == "__main__":
if sys.platform.startswith("linux") and os.getuid() != 0:
print("Agent must be running as root")
Expand Down

0 comments on commit 7e37bb7

Please sign in to comment.