Exemplo n.º 1
0
 def _process_message(self, mes):
     if CommonMethods.get_tomes_tool():
         e_msg = DmMessage(self.expand_path_from_map(self.current_relpath),
                           CommonMethods.increment_local_id(), mes,
                           self.cur_fn)
     else:
         e_msg = DmMessage(self.current_relpath,
                           CommonMethods.increment_local_id(), mes,
                           self.cur_fn)
     e_msg.message = None
     self.messages.append(e_msg)
Exemplo n.º 2
0
 def __init__(self, acct_directory, xml_dir, acct_name):
     self.account_name = acct_name
     self.account_directory = acct_directory
     self.xml_dir = xml_dir
     self.account = Account(acct_name, xml_dir)
     self.current_folder = None
     self.messages = []
     self.current_relpath = None  # type: str
     self.total_messages_processed = 0
     self.logger = logging.getLogger("EmlWalker")
     self.message_pack = DefaultListOrderedDict()
     self.account.start_account()
     self.account.write_global_id()
     self.chunks = 0
     self.new_account = True
     self.from_tomes = CommonMethods.get_tomes_tool()
     self.data_dir = os.path.join(CommonMethods.get_process_paths(),
                                  "mboxes")
     self.folder_map = {}
     self.expanded_path = str
     self.new_dir = True
     self.cur_fn = str