Use new warningregex option in GUI.

This commit is contained in:
Bastian Kleineidam 2011-10-20 09:12:28 +02:00
parent bc402a3ca0
commit c8c3470255
2 changed files with 4 additions and 1 deletions

View file

@ -17,6 +17,7 @@
import os
import sys
import re
import webbrowser
from PyQt4 import QtCore, QtGui
from .linkchecker_ui_main import Ui_MainWindow
@ -222,6 +223,8 @@ class LinkCheckerMain (QtGui.QMainWindow, Ui_MainWindow):
self.config["threads"] = 1
else:
self.config.reset_loglevel()
if data["warningregex"]:
self.config["warningregex"] = re.compile(data["warningregex"])
def get_status (self):
"""Return current application status."""

View file

@ -80,7 +80,7 @@ class LinkCheckerOptions (QtGui.QDialog, Ui_Options):
debug=self.debug.isChecked(),
verbose=self.verbose.isChecked(),
recursionlevel=self.recursionlevel.value(),
warningregex=self.warningregex.text(),
warningregex=unicode(self.warningregex.text()),
)
def set_options (self, data):