Commit 00eb07a0 authored by hydrargyrum's avatar hydrargyrum
Browse files

weboob_lint: report modules using browser1

Browser1 modules will be removed during the summer of 2017.
parent 04d87266
......@@ -7,12 +7,14 @@
from weboob.core import Weboob
import os
import sys
import subprocess
weboob = Weboob()
weboob.modules_loader.load_all()
backends_without_tests = []
backends_without_icons = []
backends_using_deprecated = []
for name, backend in weboob.modules_loader.loaded.iteritems():
path = backend.package.__path__[0]
......@@ -23,12 +25,20 @@
not backend.icon:
backends_without_icons.append(name)
if subprocess.call(['grep', '-q', '-r', 'weboob.deprecated.browser', path]) == 0:
backends_using_deprecated.append(name)
if backends_without_tests:
backends_without_tests.sort()
print('Modules without tests: %s' % backends_without_tests)
if backends_without_icons:
backends_without_icons.sort()
print('Modules without icons: %s' % backends_without_icons)
if backends_using_deprecated:
backends_using_deprecated.sort()
print('Modules using deprecated Browser 1: %s' % backends_using_deprecated)
if backends_without_tests or backends_without_icons:
sys.exit(1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment