Subversion Repositories freemyipod

Rev

Rev 501 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 501 Rev 502
Line 159... Line 159...
159
                else:
159
                else:
160
                    raise
160
                    raise
161
            except libemcore.usb.core.USBError:
161
            except libemcore.usb.core.USBError:
162
                self.logger.error("There is a problem with the USB connection.\n")
162
                self.logger.error("There is a problem with the USB connection.\n")
163
        else:
163
        else:
164
            usage("No such command")
164
            usage("No such command!", docstring = False)
165
    
165
    
166
    @staticmethod
166
    @staticmethod
167
    def _bool(something):
167
    def _bool(something):
168
        """
168
        """
169
            Converts quite everything into bool.
169
            Converts quite everything into bool.
Line 206... Line 206...
206
    def _hex(integer):
206
    def _hex(integer):
207
        return "0x%x" % integer
207
        return "0x%x" % integer
208
    
208
    
209
    @command
209
    @command
210
    def help(self):
210
    def help(self):
211
        """ Generates a list of functions """
211
        """ Displays this help """
212
        usage(None, False, False)
212
        usage(docstring = True)
213
    
213
    
214
    @command
214
    @command
215
    def getinfo(self, infotype):
215
    def getinfo(self, infotype):
216
        """
216
        """
217
            Get info on the running emCORE.
217
            Get info on the running emCORE.
Line 1248... Line 1248...
1248
        self.logger.info("Successfully freed all memory allocations created by the monitor thread\n")
1248
        self.logger.info("Successfully freed all memory allocations created by the monitor thread\n")
1249
        
1249
        
1250
 
1250
 
1251
if __name__ == "__main__":
1251
if __name__ == "__main__":
1252
    if len(sys.argv) < 2:
1252
    if len(sys.argv) < 2:
1253
        usage("No command specified")
1253
        usage("No command specified", docstring = False)
1254
    try:
1254
    try:
1255
        interface = Commandline()
1255
        interface = Commandline()
1256
        interface._parsecommand(sys.argv[1], sys.argv[2:])
1256
        interface._parsecommand(sys.argv[1], sys.argv[2:])
1257
    except KeyboardInterrupt:
1257
    except KeyboardInterrupt:
1258
        sys.exit()
1258
        sys.exit()
1259
1259