1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

Initialize Request.creator with the empty string instead of None

Old obs versions have no creator attribute. In this case, string
formatting operations will fail if the "creator" attribute is
initialized with None (affects some codepaths).
An alternative would be to officially resurrect the deprecated
"Request.get_creator" method, which could return something like
"unknown" if no creator information is present.

This is a follow-up fix for the commits d68507f and 7d54b5c.
This commit is contained in:
Marcus Huewe 2017-05-04 20:49:35 +02:00
parent d5393481cb
commit eed18c6a2e

View File

@ -2684,7 +2684,7 @@ class Request:
def _init_attributes(self):
"""initialize attributes with default values"""
self.reqid = None
self.creator = None
self.creator = ''
self.title = ''
self.description = ''
self.priority = None