mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 18:13:04 +02:00
Fix Cybook detection in windows
This commit is contained in:
parent
41d4461c65
commit
fb0cc73f40
2 changed files with 3 additions and 3 deletions
|
|
@ -177,9 +177,9 @@ def open_windows(self):
|
|||
wmi = __import__('wmi', globals(), locals(), [], -1)
|
||||
c = wmi.WMI()
|
||||
for drive in c.Win32_DiskDrive():
|
||||
if self.windows_match_device(str(drive.PNPDeviceID), WINDOWS_MAIN_MEM):
|
||||
if self.windows_match_device(str(drive.PNPDeviceID), self.WINDOWS_MAIN_MEM):
|
||||
drives['main'] = self.windows_get_drive_prefix(drive)
|
||||
elif self.windows_match_device(str(drive.PNPDeviceID), WINDOWS_CARD_MEM):
|
||||
elif self.windows_match_device(str(drive.PNPDeviceID), self.WINDOWS_CARD_MEM):
|
||||
drives['card'] = self.windows_get_drive_prefix(drive)
|
||||
|
||||
if 'main' and 'card' in drives.keys():
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ def fetch_url(self, url):
|
|||
raise FetchError, responses[err.code]
|
||||
if getattr(err, 'reason', [0])[0] == 104 or \
|
||||
getattr(err, 'errno', None) == -2: # Connection reset by peer or Name or service not know
|
||||
self.log_debug('Temporary error, retyring in 1 second')
|
||||
self.log_debug('Temporary error, retrying in 1 second')
|
||||
time.sleep(1)
|
||||
with closing(self.browser.open(url)) as f:
|
||||
data = response(f.read()+f.read())
|
||||
|
|
|
|||
Loading…
Reference in a new issue