def get_unverified_list_from_mega(settings): dst_path = MegaAccountHandler.to_absoulte_dst_path(settings) + "/" dst_path_pattern = dst_path + "archive_" # FIXME dependent on cur impl cmd = MegaAccountHandler.build_command_argumetns(command_str="megals", settings=settings) popen = MegaAccountHandler.execute_command(cmd) with popen as proc: return [file_name[len(dst_path):].strip() for file_name in proc.stdout if file_name.startswith(dst_path_pattern)]
def do_init(self, settings, rate_limiter=None): super(MegaSender, self).do_init() dst_dir_path = MegaAccountHandler.to_absoulte_dst_path(settings) self._base_comand = MegaAccountHandler.build_command_argumetns( command_str="megaput", settings=settings, extra_args=["--no-progress", "--path", dst_dir_path] ) self._destination_name = settings.destinations[0] self._prepare_service(settings) self._limited_cmd = (lambda args: args) if rate_limiter is None else (lambda args: rate_limiter.wrap_call(args))