def get_jobs(args): """Print jobs XML""" doc = None if args.id: doc = resources.get_job(args.id) else: doc = resources.get_jobs() print_result(doc)
def get_job(job_id): """Print job XML""" if job_id == None or job_id == "": print "ID required" return doc = resources.get_job(job_id) if doc == None: print "No data returned" return print(etree.tostring(doc, pretty_print=True))