From 53691840bd8f02ab722ec9cc38a17b5533a0f817 Mon Sep 17 00:00:00 2001 From: Daniel Hokka Zakrisson Date: Tue, 18 Nov 2008 16:03:06 +0000 Subject: [PATCH] If the included files fail, make db-config fail. --- db-config | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/db-config b/db-config index 93e467a..c91bc58 100755 --- a/db-config +++ b/db-config @@ -1098,18 +1098,20 @@ message, please reply so that we may investigate the problem. # DeleteBootState(state) # Run local db-config snippets + files = [] + dir = "/etc/planetlab/db-config.d" try: - dir = "/etc/planetlab/db-config.d" files = os.listdir(dir) - for file in files: - if (file.endswith(".bak") or file.endswith("~") or - file.endswith(".rpmsave") or file.endswith(".rpmnew") or - file.endswith(".orig")): - continue - execfile(os.path.join(dir, file)) except: pass + for file in files: + if (file.endswith(".bak") or file.endswith("~") or + file.endswith(".rpmsave") or file.endswith(".rpmnew") or + file.endswith(".orig")): + continue + execfile(os.path.join(dir, file)) + if __name__ == '__main__': main() -- 2.43.0