tests: Remove temporary config file in wpas_config_file
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 11 Feb 2015 12:57:30 +0000 (14:57 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 11 Feb 2015 12:57:30 +0000 (14:57 +0200)
The new wpa_supplicant configuration file writing style leaves behind
the temporary file (<filename>.tmp) if renaming fails. Clean that up in
the test case execution.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_wpas_config.py

index 1974f7f..1dd839c 100644 (file)
@@ -133,6 +133,10 @@ def test_wpas_config_file(dev):
         except:
             pass
         try:
+            os.remove(config + ".tmp")
+        except:
+            pass
+        try:
             os.rmdir(config)
         except:
             pass