aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-09-12 11:23:42 +0200
committerKarel Kočí <cynerd@email.cz>2015-09-12 11:23:42 +0200
commit762e0304d1c493447e367a45431416fbada5cc8c (patch)
tree39cb195da786fd73a0728624d2b49241086a7ea5 /scripts
parent21d73b4159d65ec1279ed603bc67f32fb8346f37 (diff)
downloadlinux-conf-perf-762e0304d1c493447e367a45431416fbada5cc8c.tar.gz
linux-conf-perf-762e0304d1c493447e367a45431416fbada5cc8c.tar.bz2
linux-conf-perf-762e0304d1c493447e367a45431416fbada5cc8c.zip
Fix fromfolder script
Script ended with exception when no file with list of non-remove configuration options was provided.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/fromfolder.py13
1 files 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))