From 60102209f60673c9d27eb35599c593f543f053c4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 1 Apr 2011 11:14:24 +0000 Subject: [PATCH] quick fix for a bug reported by Kirill (AttributeError: 'NoneType' object has no attribute 'split') --- plugins/generic/enumeration.py | 2 +- xml/livetests.xml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index a36036baa..51ac9c0b8 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -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: diff --git a/xml/livetests.xml b/xml/livetests.xml index e38dc9837..2021475ef 100644 --- a/xml/livetests.xml +++ b/xml/livetests.xml @@ -323,7 +323,7 @@ - + @@ -350,7 +350,7 @@ - + @@ -376,7 +376,7 @@ - + @@ -402,7 +402,7 @@ - +