Gentoo Archives: gentoo-catalyst

From: Mike Frysinger <vapier@g.o>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] [PATCH 02/13] lint: unwrap multiple statements
Date: Tue, 06 Oct 2015 15:05:39
Message-Id: 1444143929-26705-2-git-send-email-vapier@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 01/13] lint: fix duplicate fcntl import by Mike Frysinger
1 It's hard to read code that packs multiple statements in one line, so
2 unwrap the few places in the codebase where we do that.
3 ---
4 catalyst/config.py | 3 ++-
5 targets/stage1/build.py | 6 ++++--
6 2 files changed, 6 insertions(+), 3 deletions(-)
7
8 diff --git a/catalyst/config.py b/catalyst/config.py
9 index 48d9c12..ffad9b3 100644
10 --- a/catalyst/config.py
11 +++ b/catalyst/config.py
12 @@ -53,7 +53,8 @@ class ParserBase(object):
13 myline = trailing_comment.sub("", myline)
14
15 # Skip any blank lines
16 - if not myline: continue
17 + if not myline:
18 + continue
19
20 if self.key_value_separator in myline:
21 # Split on the first occurence of the separator creating two strings in the array mobjs
22 diff --git a/targets/stage1/build.py b/targets/stage1/build.py
23 index 6495ee3..be1bc4d 100755
24 --- a/targets/stage1/build.py
25 +++ b/targets/stage1/build.py
26 @@ -33,6 +33,8 @@ for idx in range(0, len(pkgs)):
27 buildpkgs[bidx] = pkgs[idx]
28 if buildpkgs[bidx][0:1] == "*":
29 buildpkgs[bidx] = buildpkgs[bidx][1:]
30 - except: pass
31 + except:
32 + pass
33
34 -for b in buildpkgs: sys.stdout.write(b+" ")
35 +for b in buildpkgs:
36 + sys.stdout.write(b + " ")
37 --
38 2.5.2