~devvmh/mnemosyne-proj/pbienst

« back to all changes in this revision

Viewing changes to mnemosyne/mnemosyne/pyqt_ui/review_wdgt.py

  • Committer: Peter.Bienstman at UGent
  • Date: 2016-10-12 13:50:27 UTC
  • Revision ID: peter.bienstman@ugent.be-20161012135027-urfzlj1qszrq5hrb
Fixes for minor bugs, reported by Devin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#
4
4
 
5
5
from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
 
6
import os
6
7
import sys
7
8
 
8
9
from mnemosyne.libmnemosyne.translator import _
117
118
        for match in self.re_img.finditer(html):
118
119
            img_file = match.group(1)
119
120
            img_file = expand_path(img_file, self.database().media_dir())
 
121
            if not os.path.exists(img_file):
 
122
                print("Missing path", img_file)
 
123
                continue
120
124
            with Image.open(img_file) as im:
121
125
                width, height = im.size
122
126
                if height > max_img_height: