Skip to content

Commit c82e102

Browse files
committed
bugzilla: Don't infinitely recurse if passed no data
1 parent 5cc2670 commit c82e102

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

bugzilla/bug.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ def __init__(self, bugzilla, bug_id=None, dict=None, autorefresh=True):
3333
self._bug_fields = []
3434
self.autorefresh = autorefresh
3535

36+
if not dict:
37+
dict = {}
3638
if bug_id:
37-
if not dict:
38-
dict = {}
3939
dict["id"] = bug_id
4040

41-
if dict:
42-
log.debug("Bug(%s)", sorted(dict.keys()))
43-
self._update_dict(dict)
41+
log.debug("Bug(%s)", sorted(dict.keys()))
42+
self._update_dict(dict)
4443

4544
self.weburl = bugzilla.url.replace('xmlrpc.cgi',
4645
'show_bug.cgi?id=%i' % self.bug_id)

0 commit comments

Comments
 (0)