I know that we have some task for this, but I'm not sure which one is.
Steps to reproduce:
Run python pwb.py login -family:wiktionary -lang:rs
Expected behaviour:
As lang isn't available, pywiki should show only error Language 'rs' does not exist in family wiktionary.
Actual behaviour:
Pywikibot shows all this:
Traceback (most recent call last): File "pwb.py", line 360, in <module> if not main(): File "pwb.py", line 355, in main file_package) File "pwb.py", line 74, in run_python_file main_mod.__dict__) File "./scripts/login.py", line 185, in <module> main() File "./scripts/login.py", line 155, in main site = pywikibot.Site() File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1499, in wrapper return obj(*__args, **__kw) File "/srv/paws/pwb/pywikibot/__init__.py", line 1249, in Site _sites[key] = interface(code=code, fam=fam, user=user) File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1584, in wrapper return obj(*new_args, **new_kwargs) File "/srv/paws/pwb/pywikibot/site/__init__.py", line 1712, in __init__ BaseSite.__init__(self, code, fam, user) File "/srv/paws/pwb/pywikibot/tools/__init__.py", line 1584, in wrapper return obj(*new_args, **new_kwargs) File "/srv/paws/pwb/pywikibot/site/__init__.py", line 768, in __init__ % (self.__code, self.__family.name)) pywikibot.exceptions.UnknownSite: Language 'rs' does not exist in family wiktionary CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.UnknownSite'>
Reason for this is task is that I want to make warnings/errors more friendly.