git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
====
[plcapi.git]
/
migrations
/
extract-views.py
diff --git
a/migrations/extract-views.py
b/migrations/extract-views.py
index
0daed51
..
4fd5090
100755
(executable)
--- a/
migrations/extract-views.py
+++ b/
migrations/extract-views.py
@@
-16,7
+16,7
@@
class Schema:
def parse (self):
if self.output:
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()
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:
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()
if outfile != sys.stdout:
outfile.close()