Page MenuHomePhabricator

scap-purge-l10n-cache is broken
ClosedPublic

Authored by Reedy on Nov 15 2015, 12:01 AM.

Details

Maniphest Tasks
T118659: scap-purge-l10n-cache is broken
Reviewers
demon
Group Reviewers
Release-Engineering-Team
Commits
rMSCA54d93b3956cf: scap-purge-l10n-cache is broken
Patch without arc
git checkout -b D50 && curl -L https://phabricator.wikimedia.org/D50?download=true | git apply
Summary

Fix <TypeError> object of type 'NoneType' has no len()

Diff Detail

Repository
rMSCA Scap
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Reedy updated this revision to Diff 157.Nov 15 2015, 12:01 AM
Reedy retitled this revision from to scap-purge-l10n-cache is broken.
Reedy updated this object.
Reedy edited the test plan for this revision. (Show Details)
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald TranscriptNov 15 2015, 12:01 AM
Running unit tests...
[2015-11-14 23:59:56] ERROR 2: DOMDocument::loadXML(): Empty string supplied as input at [/usr/share/arcanist/src/unit/engine/NoseTestEngine.php:120]
arcanist(), phutil()
  #0 DOMDocument::loadXML(string) called at [<arcanist>/src/unit/engine/NoseTestEngine.php:120]
  #1 NoseTestEngine::readCoverage(TempFile, string) called at [<arcanist>/src/unit/engine/NoseTestEngine.php:109]
  #2 NoseTestEngine::parseTestResults(string, TempFile, TempFile) called at [<arcanist>/src/unit/engine/NoseTestEngine.php:83]
  #3 NoseTestEngine::runTests(array, string) called at [<arcanist>/src/unit/engine/NoseTestEngine.php:40]
  #4 NoseTestEngine::run() called at [<arcanist>/src/workflow/ArcanistUnitWorkflow.php:186]
  #5 ArcanistUnitWorkflow::run() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1342]
  #6 ArcanistDiffWorkflow::runUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1221]
  #7 ArcanistDiffWorkflow::runLintUnit() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:475]
  #8 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:382]
   BROKEN  nose.failure.Failure.runTest
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 420, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/reedy/scap/tests/scap/test_ssh.py", line 6, in <module>
    from scap import ssh
  File "/home/reedy/scap/scap/__init__.py", line 9, in <module>
    from .main import (
  File "/home/reedy/scap/scap/main.py", line 11, in <module>
    import netifaces
ImportError: No module named netifaces

 UNIT ERRORS  Unit testing raised errors!
Reedy updated this revision to Diff 158.Nov 15 2015, 12:12 AM
Reedy edited edge metadata.

Re-run unit tests

Reedy updated this revision to Diff 159.Nov 15 2015, 12:17 AM

Test staging

Restricted Application added a subscriber: greg. · View Herald TranscriptNov 15 2015, 12:17 AM
demon added a subscriber: demon.Nov 15 2015, 1:20 AM
demon added inline comments.
scap/ssh.py
99

self._hosts or self.hosts?

Reedy added inline comments.Nov 15 2015, 1:24 AM
scap/ssh.py
99

I was going based on the hosts function which has already had the defaulting to [], which then sets it to self._hosts

Duplicating it to be len(hosts or []) seemed icky

demon accepted this revision.Nov 15 2015, 1:29 AM
demon added a reviewer: demon.
demon added inline comments.
scap/ssh.py
99

Ok makes sense.

This revision is now accepted and ready to land.Nov 15 2015, 1:29 AM
This revision was automatically updated to reflect the committed changes.