From 587d7864ddb01695a0138db1520e93c61fd37ef1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 22 Apr 2014 16:01:28 +0530 Subject: [PATCH] Allow using .py config files in both PyQT4 and PyQt5 --- src/calibre/utils/config_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/utils/config_base.py b/src/calibre/utils/config_base.py index b204f9f240..5d14300773 100644 --- a/src/calibre/utils/config_base.py +++ b/src/calibre/utils/config_base.py @@ -193,6 +193,7 @@ class OptionSet(object): try: if not isinstance(src, unicode): src = src.decode('utf-8') + src = src.replace(u'PyQt5.QtCore', u'PyQt4.QtCore') exec src in options except: print 'Failed to parse options string:'