From 762e0304d1c493447e367a45431416fbada5cc8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 12 Sep 2015 11:23:42 +0200 Subject: Fix fromfolder script Script ended with exception when no file with list of non-remove configuration options was provided. --- scripts/fromfolder.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/fromfolder.py b/scripts/fromfolder.py index d5bb2b3..8d67cce 100755 --- a/scripts/fromfolder.py +++ b/scripts/fromfolder.py @@ -48,11 +48,14 @@ if __name__ == '__main__': exceptfile = sys.argv[4] exceptconf = set() - if os.path.isfile(exceptfile): - for ln in open(exceptfile): - lns = ln.rstrip() - if lns: - exceptconf.add(lns) + try: + if os.path.isfile(exceptfile): + for ln in open(exceptfile): + lns = ln.rstrip() + if lns: + exceptconf.add(lns) + except NameError: + pass rem = loadfromfolder(sf(conf.linux_sources + '/' + folder)) -- cgit v1.2.3