From a30be66e9ded08faa2f7bd13247cf1105078d62a Mon Sep 17 00:00:00 2001 From: Shail Shouryya Date: Sat, 7 Nov 2020 23:11:24 -0800 Subject: [PATCH] Return file name after lc.create_list_for() finishes - this addresses the problem pointed out in issue https://github.com/Shail-Shouryya/yt_videos_list/issues/4 --- python/dev/__init__.py | 2 +- python/dev/execute.py | 1 + python/yt_videos_list/__init__.py | 2 +- python/yt_videos_list/execute.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/dev/__init__.py b/python/dev/__init__.py index a629ea0b..217536c5 100644 --- a/python/dev/__init__.py +++ b/python/dev/__init__.py @@ -158,4 +158,4 @@ def create_list_for(self, url=None, file_name=None, channel=None, channel_type=N _execution_type = 'module' instance_attributes = (self.txt, self.csv, self.markdown, self.reverse_chronological, self.headless, self.scroll_pause_time, self.driver) - execute.logic(channel, channel_type, file_name, *instance_attributes, _execution_type) + return execute.logic(channel, channel_type, file_name, *instance_attributes, _execution_type) diff --git a/python/dev/execute.py b/python/dev/execute.py index 74d381fb..8b49d9e1 100644 --- a/python/dev/execute.py +++ b/python/dev/execute.py @@ -167,3 +167,4 @@ def show_user_how_to_set_up_selenium(): program_end = time.perf_counter() total_time = program_end - program_start print(f'This program took {total_time} seconds to complete.\n') + return file_name diff --git a/python/yt_videos_list/__init__.py b/python/yt_videos_list/__init__.py index a629ea0b..217536c5 100644 --- a/python/yt_videos_list/__init__.py +++ b/python/yt_videos_list/__init__.py @@ -158,4 +158,4 @@ def create_list_for(self, url=None, file_name=None, channel=None, channel_type=N _execution_type = 'module' instance_attributes = (self.txt, self.csv, self.markdown, self.reverse_chronological, self.headless, self.scroll_pause_time, self.driver) - execute.logic(channel, channel_type, file_name, *instance_attributes, _execution_type) + return execute.logic(channel, channel_type, file_name, *instance_attributes, _execution_type) diff --git a/python/yt_videos_list/execute.py b/python/yt_videos_list/execute.py index 4285413d..32154006 100644 --- a/python/yt_videos_list/execute.py +++ b/python/yt_videos_list/execute.py @@ -128,3 +128,4 @@ def show_user_how_to_set_up_selenium(): program_end = time.perf_counter() total_time = program_end - program_start print(f'This program took {total_time} seconds to complete.\n') + return file_name