summaryrefslogtreecommitdiff
path: root/alembic/ddl
diff options
context:
space:
mode:
authorHong Minhee <minhee@dahlia.kr>2013-04-13 04:40:54 +0900
committerHong Minhee <minhee@dahlia.kr>2013-04-13 04:40:54 +0900
commitff285f75b0132aecdc8b00b1dfabb3eafce8097a (patch)
tree0be095cfcfe17ce634b28a4cbeeae92ffe578273 /alembic/ddl
parentcc6c35360e9846aa2934e0885f53e48be071ff37 (diff)
downloadalembic-ff285f75b0132aecdc8b00b1dfabb3eafce8097a.tar.gz
Use io instead of codecs and StringIO
Diffstat (limited to 'alembic/ddl')
-rw-r--r--alembic/ddl/impl.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/alembic/ddl/impl.py b/alembic/ddl/impl.py
index 1c44534..af93349 100644
--- a/alembic/ddl/impl.py
+++ b/alembic/ddl/impl.py
@@ -54,7 +54,10 @@ class DefaultImpl(ImplMeta('_ImplBase', (object,), {})):
return _impls[dialect.name]
def static_output(self, text):
- self.output_buffer.write(text + "\n\n")
+ text_ = getattr(builtins, 'unicode', str)(text + '\n\n')
+ self.output_buffer.write(text_)
+ if callable(getattr(self.output_buffer, 'flush', None)):
+ self.output_buffer.flush()
@property
def bind(self):