minor refactoring

This commit is contained in:
Miroslav Stampar
2012-05-03 22:34:18 +00:00
parent cc28f6db6b
commit 96299d3d5d
3 changed files with 7 additions and 6 deletions

View File

@@ -3207,3 +3207,6 @@ def resetCookieJar(cookieJar):
errMsg += "cookies file ('%s')" % msg
raise sqlmapGenericException, errMsg
def prioritySortColumns(columns):
_ = lambda x: x and "id" in x.lower()
return sorted(sorted(columns, key=len), lambda x, y: -1 if _(x) and not _(y) else 1 if not _(x) and _(y) else 0)