From: Johannes Berg Date: Tue, 16 Apr 2013 12:20:00 +0000 (+0200) Subject: gentree: fix typo in ignore list handling X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=805b01f10348428852e41725a71f3e2dcd66509c;p=openwrt%2Fstaging%2Fblogic.git gentree: fix typo in ignore list handling We don't want to compare the second-to-last letter with a two-character string, that'll never be true anyway ... It should compare the last two letters. Signed-off-by: Johannes Berg --- diff --git a/gentree.py b/gentree.py index 3ba73eaf1fc0..5ae88706eaef 100755 --- a/gentree.py +++ b/gentree.py @@ -137,7 +137,7 @@ def copy_files(srcpath, copy_list, outdir): def copy_ignore(dir, entries): r = [] for i in entries: - if i[-2] == '.o' or i[-1] == '~': + if i[-2:] == '.o' or i[-1] == '~': r.append(i) return r copytree(os.path.join(srcpath, srcitem),