def open_user_download_folder(self, position):
     selected_user = self.user_list[position]
     open_item = selected_user.save_path
     try:
         self.open_in_system(open_item)
     except AttributeError:
         Message.no_user_selected(self)
     except FileNotFoundError:
         Message.no_user_download_folder(self)
    def open_subreddit_download_folder(self, position):
        selected_sub = self.subreddit_list[position]
        sub_folder = '%s%s%s' % (selected_sub.save_path, '/'
                                 if not selected_sub.save_path.endswith('/')
                                 else '', selected_sub.name)

        try:
            if sys.platform == 'win32':
                os.startfile(sub_folder)
            else:
                opener = 'open' if sys.platform == 'darwin' else 'xdg-open'
                subprocess.call([opener, sub_folder])
        except AttributeError:
            Message.no_user_selected(self)
        except FileNotFoundError:
            Message.no_subreddit_download_folder(self)