X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=migrations%2Fextract-views.py;h=4fd5090e8d24b14d277ffd9ef81098d7c112a669;hb=19d4a01ccf66af9e00914351b3eacd5fc880f988;hp=0daed5193832f2dd825dd30ea24f4fac5226951e;hpb=f7a48ab901d1133508db4494564e4ecba629fe8c;p=plcapi.git diff --git a/migrations/extract-views.py b/migrations/extract-views.py index 0daed51..4fd5090 100755 --- a/migrations/extract-views.py +++ b/migrations/extract-views.py @@ -16,7 +16,7 @@ class Schema: def parse (self): if self.output: - outfile = open(self.output,"w") + outfile = open(self.output, "a") else: outfile = sys.stdout contents = file(self.input).read() @@ -40,7 +40,7 @@ class Schema: out_line=match.group(1) match=Schema.view.match(out_line) if match: - print >>outfile, out_line,';' + outfile.write("{};\n".format(out_line)) if outfile != sys.stdout: outfile.close()