summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain <syt@logilab.fr>2008-05-20 09:22:03 +0200
committerSylvain <syt@logilab.fr>2008-05-20 09:22:03 +0200
commit74b4b82394dc50b1386d503d6b16d0a7268cf9ca (patch)
tree9db82a53853d3b43f89fb5ac30a3dda6c6bc8efa
parentd0a62ea24972ce880ddb18ca983c80da8827e04e (diff)
downloadlogilab-common-74b4b82394dc50b1386d503d6b16d0a7268cf9ca.tar.gz
fix mysql create database command
-rw-r--r--adbh.py9
-rw-r--r--ureports/__init__.py1
-rw-r--r--ureports/text_writer.py4
3 files changed, 8 insertions, 6 deletions
diff --git a/adbh.py b/adbh.py
index 1e0535c..bf198b4 100644
--- a/adbh.py
+++ b/adbh.py
@@ -441,12 +441,13 @@ class _MyAdvFuncHelper(_GenericAdvFuncHelper):
"""return a list of commands to restore a backup the given database"""
cmds = []
if drop:
- cmd = 'echo "DROP DATABASE %s;" | mysql -h %s -u %s -p' % (dbname, dbhost, dbuser)
+ cmd = 'echo "DROP DATABASE %s;" | mysql -h %s -u %s -p' % (
+ dbname, dbhost, dbuser)
cmds.append(cmd)
- cmd = 'echo "%s;" | mysql -h %s -u %s -p' % (self.sql_create_database(dbname, encoding),
- dbhost, dbuser)
+ cmd = 'echo "%s;" | mysql -h %s -u %s -p' % (
+ self.sql_create_database(dbname, encoding), dbhost, dbuser)
cmds.append(cmd)
- cmd = pgdbcmd('mysql -h %s -u %s -p < %s' % (dbname, dbhost, dbuser, backupfile))
+ cmd = 'mysql -h %s -u %s -p < %s' % (dbname, dbhost, dbuser, backupfile)
cmds.append(cmd)
return cmds
diff --git a/ureports/__init__.py b/ureports/__init__.py
index 96b5517..bb19ad5 100644
--- a/ureports/__init__.py
+++ b/ureports/__init__.py
@@ -27,6 +27,7 @@ from StringIO import StringIO as UStringIO
from logilab.common.textutils import linesep
+
def get_nodes(node, klass):
"""return an iterator on all children node of the given klass"""
for child in node.children:
diff --git a/ureports/text_writer.py b/ureports/text_writer.py
index f093f5f..6e03f6b 100644
--- a/ureports/text_writer.py
+++ b/ureports/text_writer.py
@@ -15,9 +15,9 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""Text formatting drivers for ureports"""
-
-from logilab.common.ureports import BaseWriter
from logilab.common.textutils import linesep
+from logilab.common.ureports import BaseWriter
+
TITLE_UNDERLINES = ['', '=', '-', '`', '.', '~', '^']
BULLETS = ['*', '-']