Skip to content

Commit

Permalink
Merge pull request #538 from medulla-tech/deepsource-transform-ab5ea55e
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 3, 2024
2 parents 59cd821 + 20c81d8 commit 84a40de
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 118 deletions.
9 changes: 7 additions & 2 deletions pulse_xmpp_master_substitute/agentmastersubstitute.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from lib.plugins.msc import MscDatabase
from lib.plugins.pkgs import PkgsDatabase
from bin.agent import MUCBot

# import signal
from lib import manageRSAsigned

Expand All @@ -33,7 +34,6 @@
logger = logging.getLogger()



def Setdirectorytempinfo():
"""
Create directory for temporary information.
Expand All @@ -43,6 +43,7 @@ def Setdirectorytempinfo():
os.makedirs(dirtempinfo, mode=0o700)
return dirtempinfo


def createDaemon(optsconsoledebug, optsdeamon, optfileconf):
"""
This function creates a service/Daemon that will execute a det. task.
Expand All @@ -59,6 +60,7 @@ def createDaemon(optsconsoledebug, optsdeamon, optfileconf):
logging.error("\n%s" % (traceback.format_exc()))
os._exit(1)


def doTask(optsconsoledebug, optsdeamon, optfileconf):
"""
Main function that performs the agent substitute task.
Expand Down Expand Up @@ -130,7 +132,9 @@ def doTask(optsconsoledebug, optsdeamon, optfileconf):
xmpp["xep_0077"].force_registration = True

# Calculer la longueur totale de la ligne centrale
total_length = (2 + 5) * 2 + len("CONNECTION SUBSTITUT") + len(str(xmpp.boundjid.bare))
total_length = (
(2 + 5) * 2 + len("CONNECTION SUBSTITUT") + len(str(xmpp.boundjid.bare))
)
logger.info("/" + "-" * 4 + "-" * total_length + "\\")
logger.info("|----- CONNECTION XMPP SUBSTITUT %s -----|" % str(xmpp.boundjid.bare))
logger.info("\\" + "-" * 4 + "-" * total_length + "/")
Expand All @@ -148,6 +152,7 @@ def doTask(optsconsoledebug, optsdeamon, optfileconf):
finally:
xmpp.loop.close()


# def handler_CTRL(signum, frame):
# global xmpp
# logger.error("CTRL + C")
Expand Down
Loading

0 comments on commit 84a40de

Please sign in to comment.