diff --git a/src/upscaler.py b/src/upscaler.py index 5bc9ee2..a2b463f 100755 --- a/src/upscaler.py +++ b/src/upscaler.py @@ -4,7 +4,7 @@ Name: Video2X Upscaler Author: K4YT3X Date Created: December 10, 2018 -Last Modified: June 4, 2020 +Last Modified: June 5, 2020 Description: This file contains the Upscaler class. Each instance of the Upscaler class is an upscaler on an image or @@ -473,7 +473,7 @@ class Upscaler: input_file_mime_type = magic.from_file(str(self.current_input_file.absolute()), mime=True) input_file_type = input_file_mime_type.split('/')[0] input_file_subtype = input_file_mime_type.split('/')[1] - except magic.magic.MagicException: + except Exception: input_file_type = input_file_subtype = None # in case python-magic fails to detect file type diff --git a/src/video2x_gui.py b/src/video2x_gui.py index ada8fb3..3408bf3 100755 --- a/src/video2x_gui.py +++ b/src/video2x_gui.py @@ -4,7 +4,7 @@ Creator: Video2X GUI Author: K4YT3X Date Created: May 5, 2020 -Last Modified: June 4, 2020 +Last Modified: June 5, 2020 """ # local imports @@ -137,7 +137,7 @@ class InputTableModel(QAbstractTableModel): input_file_mime_type = magic.from_file(str(file_path.absolute()), mime=True) input_file_type = input_file_mime_type.split('/')[0] input_file_subtype = input_file_mime_type.split('/')[1] - except magic.magic.MagicException: + except Exception: input_file_type = input_file_subtype = None # in case python-magic fails to detect file type @@ -899,7 +899,7 @@ class Video2XMainWindow(QMainWindow): input_file_mime_type = magic.from_file(str(input_path.absolute()), mime=True) input_file_type = input_file_mime_type.split('/')[0] input_file_subtype = input_file_mime_type.split('/')[1] - except magic.magic.MagicException: + except Exception: input_file_type = input_file_subtype = None # in case python-magic fails to detect file type