Index: /trunk/src/VBox/ValidationKit/common/utils.py
===================================================================
--- /trunk/src/VBox/ValidationKit/common/utils.py	(revision 65968)
+++ /trunk/src/VBox/ValidationKit/common/utils.py	(revision 65969)
@@ -187,5 +187,5 @@
                         continue;
                     sLine = sLine.strip()
-                    if len(sLine) > 0:
+                    if sLine:
                         sVersion += ' / ' + sPrefix + sLine;
                     break;
@@ -199,5 +199,5 @@
                 oFile.close();
                 sLast = sLast.strip();
-                if len(sLast) > 0:
+                if sLast:
                     sVersion += ' (' + sLast + ')';
             except:
@@ -430,5 +430,5 @@
 
     if asArgs[0].endswith('.py'):
-        if sys.executable is not None  and  len(sys.executable) > 0:
+        if sys.executable:
             asArgs.insert(0, sys.executable);
         else:
@@ -742,5 +742,5 @@
                 return False;
             sCurName = sCurName.strip();
-            if sCurName is '':
+            if not sCurName:
                 return False;
 
@@ -915,8 +915,8 @@
             sRet = self.sImage if self.sName is None else self.sName;
             if sRet is None:
-                if self.asArgs is None or len(self.asArgs) == 0:
+                if not self.asArgs:
                     return None;
                 sRet = self.asArgs[0];
-                if len(sRet) == 0:
+                if not sRet:
                     return None;
         return os.path.basename(sRet);
@@ -1286,5 +1286,5 @@
     if cSecs > 0:
         sRet += '%ss ' % (cSecs,);
-    assert len(sRet) > 0; assert sRet[-1] == ' ';
+    assert sRet; assert sRet[-1] == ' ';
     return sRet[:-1];
 
@@ -1294,5 +1294,5 @@
     data is usually already string form.
     """
-    if isinstance(oSeconds, int) or isinstance(oSeconds, long):
+    if isinstance(oSeconds, (int, long)):
         return formatIntervalSeconds(oSeconds);
     if not isString(oSeconds):
@@ -1315,5 +1315,5 @@
     # We might given non-strings, just return them without any fuss.
     if not isString(sString):
-        if isinstance(sString, int) or isinstance(sString, long) or  sString is None:
+        if isinstance(sString, (int, long)) or sString is None:
             return (sString, None);
         ## @todo time/date objects?
@@ -1322,5 +1322,5 @@
     # Strip it and make sure it's not empty.
     sString = sString.strip();
-    if len(sString) == 0:
+    if not sString:
         return (0, 'Empty interval string.');
 
@@ -1335,7 +1335,7 @@
     for sPart in asRawParts:
         sPart = sPart.strip();
-        if len(sPart) > 0:
+        if sPart:
             asParts.append(sPart);
-    if len(asParts) == 0:
+    if not asParts:
         return (0, 'Empty interval string or something?');
 
@@ -1373,5 +1373,5 @@
         else:
             asErrors.append('Bad number "%s".' % (sNumber,));
-    return (cSeconds, None if len(asErrors) == 0 else ' '.join(asErrors));
+    return (cSeconds, None if not asErrors else ' '.join(asErrors));
 
 def formatIntervalHours(cHours):
@@ -1393,5 +1393,5 @@
     if cHours > 0:
         sRet += '%sh ' % (cHours,);
-    assert len(sRet) > 0; assert sRet[-1] == ' ';
+    assert sRet; assert sRet[-1] == ' ';
     return sRet[:-1];
 
@@ -1405,5 +1405,5 @@
     # We might given non-strings, just return them without any fuss.
     if not isString(sString):
-        if isinstance(sString, int) or isinstance(sString, long) or  sString is None:
+        if isinstance(sString, (int, long)) or sString is None:
             return (sString, None);
         ## @todo time/date objects?
@@ -1412,5 +1412,5 @@
     # Strip it and make sure it's not empty.
     sString = sString.strip();
-    if len(sString) == 0:
+    if not sString:
         return (0, 'Empty interval string.');
 
@@ -1425,7 +1425,7 @@
     for sPart in asRawParts:
         sPart = sPart.strip();
-        if len(sPart) > 0:
+        if sPart:
             asParts.append(sPart);
-    if len(asParts) == 0:
+    if not asParts:
         return (0, 'Empty interval string or something?');
 
@@ -1459,5 +1459,5 @@
         else:
             asErrors.append('Bad number "%s".' % (sNumber,));
-    return (cHours, None if len(asErrors) == 0 else ' '.join(asErrors));
+    return (cHours, None if not asErrors else ' '.join(asErrors));
 
 
@@ -1519,5 +1519,5 @@
                 asRet.append('internal-error: Hit exception #2! %s' % (traceback.format_exc(),));
 
-            if len(asRet) == 0:
+            if not asRet:
                 asRet.append('No exception info...');
         except:
@@ -1575,5 +1575,5 @@
     """
     asArgs = argsSplit(sCmdLine);
-    if asArgs is None  or  len(asArgs) == 0:
+    if not asArgs:
         return None;
 
@@ -1789,5 +1789,5 @@
                         try:    os.unlink(sLinkFile);
                         except: pass;
-                        if sParentDir is not ''  and  not os.path.exists(sParentDir):
+                        if sParentDir and not os.path.exists(sParentDir):
                             os.makedirs(sParentDir);
                         try:    os.link(sLinkTarget, sLinkFile);
