]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
tools: config-create: Return empty dir list when running in generator mode
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 20 Jul 2014 18:01:10 +0000 (20:01 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Mon, 28 Jul 2014 04:35:56 +0000 (06:35 +0200)
No point in returning valid results here. The files in this directory
may not be accessible for normal users, and then the collector
generation will fail prematurely.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
tools/jailhouse-config-create

index bc3bc6c541c2f9069a5998030d90f80afdabb3b1..5e796bad89fb4a11e9da0a7d11cd10399b1baa34 100755 (executable)
@@ -213,6 +213,8 @@ def input_readline(name, record=True, optional=False):
 def input_listdir(dir, wildcards):
     for w in wildcards:
         inputs['dirs'].add(dir + '/' + w)
+    if options.generate_collector:
+        return []
     return os.listdir(options.root + dir)