quick fix for a bug reported by Kirill (AttributeError: 'NoneType' object has no attribute 'split')

This commit is contained in:
Miroslav Stampar
2011-04-01 11:14:24 +00:00
parent ee15988878
commit 60102209f6
2 changed files with 5 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ class Enumeration:
if Backend.getIdentifiedDbms() == DBMS.MYSQL:
self.getCurrentUser()
query = queries[Backend.getIdentifiedDbms()].is_dba.query % kb.data.currentUser.split("@")[0]
query = queries[Backend.getIdentifiedDbms()].is_dba.query % (kb.data.currentUser.split("@")[0] if kb.data.currentUser else None)
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE) and user is not None:
query = queries[Backend.getIdentifiedDbms()].is_dba.query2 % user
else: