Modify the empty list ensure method
This commit just simplifies the condition.
The original code is not wrong but this
patch makes it simpler than the original.
It would be better for the maintainance code.
Change-Id: I00e5b75290f10e86c8e45b5d224ef66d7938bb69
diff --git a/tempest/cmd/init.py b/tempest/cmd/init.py
index 9a85d89..84c8631 100644
--- a/tempest/cmd/init.py
+++ b/tempest/cmd/init.py
@@ -136,7 +136,7 @@
if not os.path.isdir(local_dir):
LOG.debug('Creating local working dir: %s', local_dir)
os.mkdir(local_dir)
- elif not os.listdir(local_dir) == []:
+ elif os.listdir(local_dir):
raise OSError("Directory you are trying to initialize already "
"exists and is not empty: %s" % local_dir)