Page MenuHomePhabricator

scap-purge-l10n-cache is broken
Closed, ResolvedPublic

Description

reedy@tin:/srv/mediawiki-staging$ scap-purge-l10n-cache  --version php-1.26wmf22
22:15:35 Unhandled error:
Traceback (most recent call last):
  File "/srv/deployment/scap/scap/scap/cli.py", line 276, in run
    exit_status = app.main(extra_args)
  File "/srv/deployment/scap/scap/scap/main.py", line 223, in main
    tasks.purge_l10n_cache(self.arguments.version, self.config)
  File "/srv/deployment/scap/scap/scap/tasks.py", line 244, in purge_l10n_cache
    purge = ssh.Job(user=cfg['ssh_user']).role(cfg['dsh_targets'])
  File "/srv/deployment/scap/scap/scap/utils.py", line 348, in context_wrapper
    return func(*args, **kwargs)
  File "/srv/deployment/scap/scap/scap/ssh.py", line 99, in __init__
    self.max_failure = len(hosts)
TypeError: object of type 'NoneType' has no len()
22:15:35 scap-purge-l10n-cache failed: <TypeError> object of type 'NoneType' has no len()
reedy@tin:/srv/mediawiki-staging$

Revisions and Commits

Event Timeline

Reedy raised the priority of this task from to Needs Triage.
Reedy updated the task description. (Show Details)
Reedy added a project: Deployments.
Reedy subscribed.
Reedy renamed this task from scap-purge-l10n-cache is broken to scap-purge-l10n-cache is broken on old mw version numbers.Nov 14 2015, 10:28 PM
Reedy set Security to None.
Reedy renamed this task from scap-purge-l10n-cache is broken on old mw version numbers to scap-purge-l10n-cache is broken.Nov 14 2015, 10:39 PM

Proposed patch...

diff --git a/scap/ssh.py b/scap/ssh.py
index ddaeaf5..232076c 100644
--- a/scap/ssh.py
+++ b/scap/ssh.py
@@ -96,7 +96,7 @@ class Job(object):
         self._command = command
         self._reporter = None
         self._user = user
-        self.max_failure = len(hosts)
+        self.max_failure = len(self._hosts)
         self._logger = logger
         self.output_handler = OutputHandler
Reedy added a revision: Restricted Differential Revision.Nov 15 2015, 12:02 AM
demon claimed this task.