mirror of
https://github.com/Huluti/Curtail.git
synced 2024-10-26 15:20:17 +03:00
Update tools.py
This commit is contained in:
parent
ce3ab4d527
commit
08f6153397
@ -16,6 +16,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
import logging
|
||||
import platform
|
||||
import subprocess
|
||||
from gi.repository import Gtk, GLib, Gio, GdkPixbuf
|
||||
@ -80,7 +81,8 @@ def create_image_from_file(filename, max_width, max_height):
|
||||
# Image preview
|
||||
try:
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(filename)
|
||||
except:
|
||||
except Exception as err:
|
||||
logging.error(str(err))
|
||||
return None
|
||||
|
||||
# Calculate new dimensions while preserving aspect ratio
|
||||
|
Loading…
Reference in New Issue
Block a user