Skip to content

Commit

Permalink
Fix TypeError: <lambda>() takes no arguments (1 given)
Browse files Browse the repository at this point in the history
zdaemon changed the API of ZDCmd.awhile() and now the cond predicate
gets one argument (a 0-based attempt number).
  • Loading branch information
mgedmin committed Jul 12, 2019
1 parent 05bff2c commit cf5d30b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def read(*rnames):
],
},
extras_require = dict(
tests = ['zdaemon', 'zc.recipe.filestorage', 'PasteScript'],
tests=['zdaemon >= 3.0.0', 'zc.recipe.filestorage', 'PasteScript'],
),
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
8 changes: 4 additions & 4 deletions zc/zope3recipes/winctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def do_debug(self, arg):
self.proc = Popen(program)
self.zd_pid = self.proc.pid
self.zd_up = 1
self.awhile(lambda: self.zd_pid,
self.awhile(lambda n: self.zd_pid,
"Zope3 started in debug mode, pid=%(zd_pid)d")

def help_debug(self):
Expand Down Expand Up @@ -261,7 +261,7 @@ def do_stop(self, arg):
self.zd_up = 0
self.zd_pid = 0
cpid = win32process.GetCurrentProcessId()
self.awhile(lambda: not getChildrenPidsOfPid(cpid), "Zope3 stopped")
self.awhile(lambda n: not getChildrenPidsOfPid(cpid), "Zope3 stopped")

def do_kill(self, arg):
self.do_stop(arg)
Expand All @@ -273,7 +273,7 @@ def do_restart(self, arg):
self.do_start(arg)
else:
self.do_start(arg)
self.awhile(lambda: self.zd_pid not in (0, pid),
self.awhile(lambda n: self.zd_pid not in (0, pid),
"Zope3 restarted, pid=%(zd_pid)d")

def show_options(self):
Expand All @@ -295,7 +295,7 @@ def do_start(self, arg):
self.proc = Popen(program)
self.zd_pid = self.proc.pid
self.zd_up = 1
self.awhile(lambda: self.zd_pid,
self.awhile(lambda n: self.zd_pid,
"Zope3 started, pid=%(zd_pid)d")

def do_fg(self, arg):
Expand Down

0 comments on commit cf5d30b

Please sign in to comment.