added --hostname switch to retrieve DBMS server hostname - closes issue #69

This commit is contained in:
Bernardo Damele
2012-07-12 00:01:57 +01:00
parent 4e64c1126d
commit 53c0336b48
7 changed files with 39 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ class Dump:
def string(self, header, data, sort=True):
if isListLike(data):
self.lister(header, data, sort)
elif data is not None:
elif data is not None and len(data) > 0:
data = getUnicode(data)
if data[-1] == '\n':
@@ -125,6 +125,9 @@ class Dump:
else:
self.string("current database", data)
def hostname(self,data):
self.string("hostname", data)
def dba(self,data):
self.string("current user is DBA", data)