Fix calls to private connect/disconnect methods
Change remaining .connect() and .disconnect() calls to private ._connect() and ._disconnect() after removing public methods. Changes: - Update EmailForwarder.sync_all_folders to use _connect/_disconnect
This commit is contained in:
parent
daef4cbc9f
commit
d9cbf829bb
1 changed files with 4 additions and 4 deletions
|
|
@ -165,8 +165,8 @@ class EmailForwarder:
|
|||
|
||||
def sync_all_folders(self):
|
||||
"""Sync all configured folders."""
|
||||
self.source.connect()
|
||||
self.dest.connect()
|
||||
self.source._connect()
|
||||
self.dest._connect()
|
||||
|
||||
folders_config = self.config["folders"]
|
||||
folders = self.source.get_folders_to_sync(folders_config)
|
||||
|
|
@ -185,8 +185,8 @@ class EmailForwarder:
|
|||
except Exception as e:
|
||||
logging.error(f"Error syncing {folder}: {e}")
|
||||
|
||||
self.source.disconnect()
|
||||
self.dest.disconnect()
|
||||
self.source._disconnect()
|
||||
self.dest._disconnect()
|
||||
logging.info(f"Total forwarded: {total_forwarded}")
|
||||
|
||||
def sync_folder(self, folder: str, uids: list):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue