示例#1
0
def rules_ext(targetdir,rext_file,ext_file):
    print "Generating rules-file: %s -> %s" % (rext_file,ext_file)
    inputfile = os.path.join(targetdir,rext_file)
    outputfile = os.path.join(targetdir,ext_file)
    with open(inputfile,'r') as in_fileobj:
        with open(outputfile,'w') as out_fileobj:
            try:
                rextendedrules.rextendedrules(targetdir,False,in_fileobj,out_fileobj)
            except rextendedrules.RextendedrulesError,e:
                raise
示例#2
0
def rules_ext(targetdir, rext_file, ext_file):
    print "Generating rules-file: %s -> %s" % (rext_file, ext_file)
    inputfile = os.path.join(targetdir, rext_file)
    outputfile = os.path.join(targetdir, ext_file)
    with open(inputfile, 'r') as in_fileobj:
        with open(outputfile, 'w') as out_fileobj:
            try:
                rextendedrules.rextendedrules(targetdir, False, in_fileobj,
                                              out_fileobj)
            except rextendedrules.RextendedrulesError, e:
                raise
示例#3
0
def mt_rules_ext(targetdir,rext_file):

    outputfile = "multitarget-rules.ext"
    inputfile = os.path.join(targetdir,rext_file)
    print "Generating %s" % outputfile

    out_fileobj = StringIO()
    with open(inputfile,'r') as in_fileobj:
        try:
            rextendedrules.rextendedrules(targetdir,False,in_fileobj,out_fileobj)
        except rextendedrules.RextendedrulesError,e:
            raise
示例#4
0
def mt_rules_ext(targetdir, rext_file):

    outputfile = "multitarget-rules.ext"
    inputfile = os.path.join(targetdir, rext_file)
    print "Generating %s" % outputfile

    out_fileobj = StringIO()
    with open(inputfile, 'r') as in_fileobj:
        try:
            rextendedrules.rextendedrules(targetdir, False, in_fileobj,
                                          out_fileobj)
        except rextendedrules.RextendedrulesError, e:
            raise