Gentoo Archives: gentoo-catalyst

From: Mike Frysinger <vapier@g.o>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] [PATCH 10/13] lint: init all members in __init__
Date: Tue, 06 Oct 2015 15:06:05
Message-Id: 1444143929-26705-10-git-send-email-vapier@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 01/13] lint: fix duplicate fcntl import by Mike Frysinger
1 A few class members were being set outside of __init__. Usually this is
2 an oversight, so having the linter complain is helpful. Set up the few
3 places in the code that don't do this.
4 ---
5 catalyst/base/stagebase.py | 2 ++
6 catalyst/lock.py | 1 +
7 2 files changed, 3 insertions(+)
8
9 diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
10 index e393c5b..7bc7522 100644
11 --- a/catalyst/base/stagebase.py
12 +++ b/catalyst/base/stagebase.py
13 @@ -73,6 +73,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
14 previously. -agaffney
15 """
16
17 + self.makeconf = {}
18 self.archmap = {}
19 self.subarchmap = {}
20 machinemap = {}
21 @@ -156,6 +157,7 @@ class StageBase(TargetBase, ClearBase, GenBase):
22 self.set_source_subpath()
23
24 """ Set paths """
25 + self.snapshot_lock_object = None
26 self.set_snapshot_path()
27 self.set_root_path()
28 self.set_source_path()
29 diff --git a/catalyst/lock.py b/catalyst/lock.py
30 index d6653f7..d079b2d 100644
31 --- a/catalyst/lock.py
32 +++ b/catalyst/lock.py
33 @@ -54,6 +54,7 @@ class LockDir(object):
34 else:
35 LockDir.lock_dirs_in_use.append(lockdir)
36
37 + self.myhardlock = None
38 self.hardlock_paths={}
39
40 def delete_lock_from_path_list(self):
41 --
42 2.5.2