diff --git a/tools/dbmaint.py b/tools/dbmaint.py
index <HASH>..<HASH> 100755
--- a/tools/dbmaint.py
+++ b/tools/dbmaint.py
@@ -125,7 +125,7 @@ def version_key(string):
     """Returns a version representation useful for version comparison"""
 
     # remove the trailing '-<release>' number if any
-    string, _ = (string + '-').split('-', 1)
+    string = string.split('-', 1)[0]
 
     return version.StrictVersion(string)
Simplify stupid code (thanks to al-maisan).


Former-commit-id: 3b<I>da<I>cce4e<I>a3e<I>a<I>dfcd8cadb1dba