From 30384a78414636fb6a7af5a548f1ed188c29be8e Mon Sep 17 00:00:00 2001 From: GRiker Date: Fri, 3 Jun 2011 08:15:23 -0600 Subject: [PATCH] Added diagnostic detecting non-responsive iTunes automation interface in response to #791530 --- src/calibre/devices/apple/driver.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index d15f4070a7..bce035d25b 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -2392,6 +2392,15 @@ class ITUNES(DriverBase): self.iTunes.Windows[0].Minimized = True self.initial_status = 'launched' + try: + # Pre-emptive test to confirm functional iTunes automation interface + foo = self.iTunes.Version + except: + self.iTunes = None + raise OpenFeedback('Unable to connect to iTunes.\n' + + ' iTunes automation interface non-responsive, ' + + 'recommend reinstalling iTunes') + # Read the current storage path for iTunes media from the XML file media_dir = '' string = None @@ -2988,7 +2997,6 @@ class ITUNES(DriverBase): newmi = book return newmi - class ITUNES_ASYNC(ITUNES): ''' This subclass allows the user to interact directly with iTunes via a menu option