mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-06 04:02:30 +02:00
Explicitly disable MTP on windows XP, since some devices causes errors. See #1054273
This commit is contained in:
parent
5c425b2335
commit
647aed399a
1 changed files with 6 additions and 2 deletions
|
|
@ -13,7 +13,7 @@
|
|||
from itertools import chain
|
||||
|
||||
from calibre import as_unicode, prints
|
||||
from calibre.constants import plugins, __appname__, numeric_version
|
||||
from calibre.constants import plugins, __appname__, numeric_version, isxp
|
||||
from calibre.ptempfile import SpooledTemporaryFile
|
||||
from calibre.devices.errors import OpenFailed, DeviceError, BlacklistedDevice
|
||||
from calibre.devices.mtp.base import MTPDeviceBase, debug
|
||||
|
|
@ -55,7 +55,11 @@ def __init__(self, *args, **kwargs):
|
|||
|
||||
def startup(self):
|
||||
self.start_thread = threading.current_thread()
|
||||
self.wpd, self.wpd_error = plugins['wpd']
|
||||
if isxp:
|
||||
self.wpd = None
|
||||
self.wpd_error = _('MTP devices are not supported on Windows XP')
|
||||
else:
|
||||
self.wpd, self.wpd_error = plugins['wpd']
|
||||
if self.wpd is not None:
|
||||
try:
|
||||
self.wpd.init(__appname__, *(numeric_version[:3]))
|
||||
|
|
|
|||
Loading…
Reference in a new issue