[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. 0.51
Andreas Beckmann
anbe at debian.org
Wed May 15 10:09:47 UTC 2013
The following commit has been merged in the master branch:
commit 5e22f629f9a509d74303b260eeac560fe980e708
Author: Andreas Beckmann <anbe at debian.org>
Date: Mon Apr 8 01:06:30 2013 +0200
p-m: allow switching sections without reconnecting
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/piuparts-master-backend.py b/piuparts-master-backend.py
index 875b479..de62dca 100644
--- a/piuparts-master-backend.py
+++ b/piuparts-master-backend.py
@@ -145,15 +145,22 @@ class Master(Protocol):
"untestable": self._untestable,
}
self._section = None
+ self._lock = None
self._init_section(section)
self._writeline("hello")
def _init_section(self, section):
- self._section = section
+ if self._lock:
+ self._lock.close()
+
+ # clear all settings from a previous section and set defaults
+ self._section = None
+ self._lock = None
self._recycle_mode = False
self._idle_mode = None
self._idle_stamp = os.path.join(section, "idle.stamp")
self._package_databases = None
+ self._binary_db = None
config = Config(section=section, defaults_section="global")
try:
@@ -172,6 +179,8 @@ class Master(Protocol):
print 'busy'
sys.exit(0)
+ self._section = section
+
logfile = config["log-file"] or os.path.join(section, "master.log")
setup_logging(logging.DEBUG, logfile)
--
piuparts git repository
More information about the Piuparts-commits
mailing list