Fix <TypeError> object of type 'NoneType' has no len()
Details
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
Diff Detail
Diff Detail
- Repository
- rMSCA Scap
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
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!
scap/ssh.py | ||
---|---|---|
99 | self._hosts or self.hosts? |
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 |
scap/ssh.py | ||
---|---|---|
99 | Ok makes sense. |