]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Import sqlite3 only if used
authorJohannes Berg <johannes.berg@intel.com>
Wed, 30 Oct 2013 17:20:07 +0000 (19:20 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 30 Oct 2013 17:20:07 +0000 (19:20 +0200)
Might help some systems that don't have/need it.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

tests/hwsim/run-tests.py

index d288f9468d22ee8207791ba54af9fa881616ef15..e319eec01b2ce2337435e3fe260ae88f4d05512a 100755 (executable)
@@ -10,7 +10,6 @@ import os
 import re
 import sys
 import time
-import sqlite3
 from datetime import datetime
 
 import logging
@@ -83,6 +82,7 @@ def main():
             test_file = sys.argv[idx + 1]
             idx = idx + 2
         elif len(sys.argv) > idx + 1 and sys.argv[idx] == '-S':
+            import sqlite3
             conn = sqlite3.connect(sys.argv[idx + 1])
             idx = idx + 2
         elif len(sys.argv) > idx + 1 and sys.argv[idx] == '-b':