Fix Cybook detection in windows

This commit is contained in:
Kovid Goyal 2009-01-20 08:33:33 -08:00
parent 41d4461c65
commit fb0cc73f40
2 changed files with 3 additions and 3 deletions

View File

@ -177,9 +177,9 @@ class Device(_Device):
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():

View File

@ -187,7 +187,7 @@ class RecursiveFetcher(object, LoggingInterface):
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())