freemyipod r440 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r439‎ | r440 | r441 >
Date:23:56, 16 January 2011
Author:farthen
Status:new
Tags:
Comment:
libemcore.py: check for swtypeid and refuse to work with emBIOS
Modified paths:
  • /emcore/trunk/tools/libemcore.py (modified) (history)

Diff [purge]

Index: emcore/trunk/tools/libemcore.py
@@ -103,6 +103,12 @@
104104 self.lib = Lib(self.logger)
105105
106106 self.getversioninfo()
 107+ if self.lib.dev.swtypeid != 2:
 108+ if self.lib.dev.swtypeid == 1:
 109+ raise DeviceError("Connected to emBIOS. emBIOS is not supported by libemcore")
 110+ else:
 111+ raise DeviceError("Connected to unknown software type. Exiting")
 112+
107113 self.getpacketsizeinfo()
108114 self.getusermemrange()
109115