def next6_cmd(parsed): conffile = os.path.abspath(parsed.runconffile) if not os.path.exists(conffile): phil.err('{0} does not exist.'.format(conffile)) return 1 p = phil.Phil(parsed.quiet, parsed.debug) return p.next6(conffile)
def next6_cmd(parsed): conffile = os.path.abspath(parsed.runconffile) if not os.path.exists(conffile): phil.err("{0} does not exist.".format(conffile)) return 1 p = phil.Phil(parsed.quiet, parsed.debug) return p.next6(conffile)
def createfile_cmd(parsed): outfile = parsed.conffile path = os.path.abspath(outfile) conffile = phil.get_template() if os.path.exists(path): phil.err("{0} exists. Remove it and try again or try again with " "a different filename.".format(outfile)) return 1 f = open(path, "w") f.write(conffile) f.close() phil.out("{0} written. Open it in your favorite editor and read it.".format(outfile)) return 0
def createfile_cmd(parsed): outfile = parsed.conffile path = os.path.abspath(outfile) conffile = phil.get_template() if os.path.exists(path): phil.err('{0} exists. Remove it and try again or try again with ' 'a different filename.'.format(outfile)) return 1 f = open(path, 'w') f.write(conffile) f.close() phil.out('{0} written. Open it in your favorite editor and read it.' .format(outfile)) return 0