Bug 38926 - typo in appcenter error handling
typo in appcenter error handling
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Florian Best
Alexander Kramer
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-15 18:11 CEST by Florian Best
Modified: 2015-08-11 10:05 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2015-07-15 18:11:15 CEST
We received the following traceback. It's caused by the last appcenter erratum.

Die Ausführung des Kommandos appcenter/query ist fehlgeschlagen:

Traceback (most recent call last):
  File "%PY2.7%/univention/management/console/base.py", line 282, in execute
    function(self, request)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 81, in _decorated
    return func(self, request, *a, **kwargs)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 316, in _response
    result = _multi_response(self, request)
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 460, in _response
    return list(function(self, iterator, *nones))
  File "%PY2.7%/univention/management/console/modules/decorators.py", line 282, in _fake_func
    yield function(self, *args)
  File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 123, in query
    applications = Application.all(force_reread=True)
  File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 772, in all
    cls.sync_with_server()
  File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 604, in sync_with_server
    raise AppcenterServerContactFailed(exc)
  File "%PY2.7%/univention/management/console/modules/appcenter/app_center.py", line 128, in __init__
    message = _('Error while contacting the App Center server. %s') % (verbose_http_error(exc),)
  File "%PY2.7%/univention/management/console/modules/appcenter/util.py", line 157, in verbose_http_error
    strerror += getattr(exc, 'strerror', '')
TypeError: cannot concatenate 'str' and 'NoneType' objects
Comment 1 Florian Best univentionstaff 2015-07-15 18:12:53 CEST
-               strerror += getattr(exc, 'strerror', '')
+               strerror += getattr(exc, 'strerror', '') or ''
Comment 2 Florian Best univentionstaff 2015-07-23 15:50:43 CEST
2015-05-28-univention-management-console-module-appcenter.yaml:
r62375 | YAML Bug #38926

univention-management-console-module-appcenter (4.1.20-39):
r62368 | Bug #38926: fix error handling
Comment 3 Alexander Kramer univentionstaff 2015-07-31 12:35:25 CEST
(In reply to Florian Best from comment #1)
> -               strerror += getattr(exc, 'strerror', '')
> +               strerror += getattr(exc, 'strerror', '') or ''

OK - if exc.strerror is None the reported traceback won't appear again
OK - debian/changelog
OK - yaml
Comment 4 Janek Walkenhorst univentionstaff 2015-08-06 17:53:55 CEST
<http://errata.univention.de/ucs/4.0/267.html>
Comment 5 Florian Best univentionstaff 2015-08-11 10:05:50 CEST
Reported again, 4.0-2 errata263 (Walle)