freemyipod r502 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r501‎ | r502 | r503 >
Date:00:43, 1 February 2011
Author:farthen
Status:new
Tags:
Comment:
emcore.py: Change default behavior if emcore.py is run without arguments/with unknown arguments. It only displays a function summary then. You can view the full function list by running 'emcore.py help'
Modified paths:
  • /emcore/trunk/tools/emcore.py (modified) (history)

Diff [purge]

Index: emcore/trunk/tools/emcore.py
@@ -161,7 +161,7 @@
162162 except libemcore.usb.core.USBError:
163163 self.logger.error("There is a problem with the USB connection.\n")
164164 else:
165 - usage("No such command")
 165+ usage("No such command!", docstring = False)
166166
167167 @staticmethod
168168 def _bool(something):
@@ -208,8 +208,8 @@
209209
210210 @command
211211 def help(self):
212 - """ Generates a list of functions """
213 - usage(None, False, False)
 212+ """ Displays this help """
 213+ usage(docstring = True)
214214
215215 @command
216216 def getinfo(self, infotype):
@@ -1250,7 +1250,7 @@
12511251
12521252 if __name__ == "__main__":
12531253 if len(sys.argv) < 2:
1254 - usage("No command specified")
 1254+ usage("No command specified", docstring = False)
12551255 try:
12561256 interface = Commandline()
12571257 interface._parsecommand(sys.argv[1], sys.argv[2:])