@@ -89,10 +89,7 @@ def configure_mailboxes(base_dir: str, mailboxes: list[str]):
8989 for mailbox in mailboxes :
9090 mailbox = mailbox .strip ().upper ()
9191 mailbox_path = os .path .abspath (f"{ base_dir } /data/{ mailbox } " )
92- root .append (
93- etree .fromstring (
94- dedent (
95- f"""<Client>
92+ root .append (etree .fromstring (dedent (f"""<Client>
9693 <ClientIdentity>{ mailbox } </ClientIdentity>
9794 <ClientAuthentication>password</ClientAuthentication>
9895 <MailboxType>MESH</MailboxType>
@@ -101,10 +98,7 @@ def configure_mailboxes(base_dir: str, mailboxes: list[str]):
10198 <TransferReport>N</TransferReport>
10299 <PollReport>N</PollReport>
103100 <SaveSent>Y</SaveSent>
104- </Client>"""
105- )
106- )
107- )
101+ </Client>""" )))
108102 shutil .copytree (f"{ base_dir } /data/_TEMPLATE" , mailbox_path )
109103
110104 root .getroottree ().write (java_client_config_path , pretty_print = True )
@@ -127,8 +121,7 @@ def send_message(
127121 dat_file .write (data )
128122
129123 with open (f"{ file_path } .ctl" , "w" , encoding = "utf8" ) as ctl_file :
130- ctl_file .write (
131- f"""<DTSControl>
124+ ctl_file .write (f"""<DTSControl>
132125<Version>1.0</Version>
133126<AddressType>DTS</AddressType>
134127<MessageType>Data</MessageType>
@@ -140,8 +133,7 @@ def send_message(
140133<Compress>{ 'Y' if compress else 'N' } </Compress>
141134<AllowChunking>Y</AllowChunking>
142135<Encrypted>N</Encrypted>
143- </DTSControl>"""
144- )
136+ </DTSControl>""" )
145137
146138 sleep (1.5 ) # have to wait as client will not pick up files added < 1 sec ago
147139 return file_name
0 commit comments