Changeset 201

Show
Ignore:
Timestamp:
05/16/05 08:27:08 (4 years ago)
Author:
athomas
Message:

Help now works with callbacks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • manage/branches/python/CLI.py

    r200 r201  
    311311                                        return help 
    312312                                elif htype is tuple or htype is list: 
     313                                        if type(help[0]) is list or type(help[0]) is tuple: 
     314                                                out = {} 
     315                                                for k, v in help: 
     316                                                        out[k] = v 
     317                                                return out 
    313318                                        return { help[0] : help[1] } 
    314319                                elif htype is str: 
    315320                                        return { key : help } 
    316321                                elif htype is types.FunctionType: 
    317                                         return dict(help(self)
     322                                        return self.parse_help_node(key, {'HELP' : help(self) }
    318323                                else: 
    319324                                        raise TypeError("expected dict, tuple or str for HELP branch, got %s" % htype)