mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-29 16:09:10 +00:00
ignoring all python-magic errors
This commit is contained in:
parent
eb2b62b056
commit
751150fe64
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user