Exemple #1
0
def processOptions(odict, args):

    if (len(args) > 0):
        usage()

    if not Picklable.isValidID(odict["e"]):
        raise Picklable.InvalidID(odict["e"])
    if odict.has_key("p") and not Picklable.isValidID(odict["p"]):
        raise Picklable.InvalidID(odict["p"])
        
    if odict.has_key("debug"):
        logging.getLogger().setLevel(logging.DEBUG)
        
    return (odict, args)
Exemple #2
0
def processOptions(odict, args):

    if (len(args) > 1):
        usage()
        
    if ((len(args) > 0) and not Picklable.isValidID(args[0])):
        raise Picklable.InvalidID(args[0])
    
    if odict.has_key("debug"):
        logging.getLogger().setLevel(logging.DEBUG)
        
    odict["grid-mode"] = True
        
    return (odict, args)