mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
correctly load prefs file modified in more recent qt
This commit is contained in:
parent
3c994ce257
commit
eef0b92374
1 changed files with 6 additions and 0 deletions
|
@ -133,6 +133,12 @@ a flash drive.""" % self.base)
|
|||
def _unpickle(self, data):
|
||||
class Unpickler(pickle.Unpickler):
|
||||
def find_class(self, module, name):
|
||||
if module == "PyQt5.sip":
|
||||
try:
|
||||
import PyQt5.sip
|
||||
except:
|
||||
# use old sip location
|
||||
module = "sip"
|
||||
fn = super().find_class(module, name)
|
||||
if module == "sip" and name == "_unpickle_type":
|
||||
def wrapper(mod, obj, args):
|
||||
|
|
Loading…
Reference in a new issue