Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_ids(params):
assert "include_fields" not in params or params["include_fields"] == "id"
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
Bugzilla.BUGZILLA_CHUNK_SIZE = 7000
all_ids = []
def bughandler(bug):
all_ids.append(bug["id"])
params["include_fields"] = "id"
Bugzilla(params, bughandler=bughandler).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
return all_ids
def get_ids(params):
assert "include_fields" not in params or params["include_fields"] == "id"
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
Bugzilla.BUGZILLA_CHUNK_SIZE = 7000
all_ids = []
def bughandler(bug):
all_ids.append(bug["id"])
params["include_fields"] = "id"
Bugzilla(params, bughandler=bughandler).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
return all_ids
def get_ids(params):
assert "include_fields" not in params or params["include_fields"] == "id"
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
Bugzilla.BUGZILLA_CHUNK_SIZE = 7000
all_ids = []
def bughandler(bug):
all_ids.append(bug["id"])
params["include_fields"] = "id"
Bugzilla(params, bughandler=bughandler).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
return all_ids
def get_ids(params):
assert "include_fields" not in params or params["include_fields"] == "id"
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
Bugzilla.BUGZILLA_CHUNK_SIZE = 7000
all_ids = []
def bughandler(bug):
all_ids.append(bug["id"])
params["include_fields"] = "id"
Bugzilla(params, bughandler=bughandler).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
return all_ids
assert "include_fields" not in params or params["include_fields"] == "id"
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
Bugzilla.BUGZILLA_CHUNK_SIZE = 7000
all_ids = []
def bughandler(bug):
all_ids.append(bug["id"])
params["include_fields"] = "id"
Bugzilla(params, bughandler=bughandler).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
return all_ids
def get_bugs(self, date="today", bug_ids=[], chunk_size=None):
"""Get the bugs"""
bugs = self.get_data()
params = self.get_bz_params(date)
self.amend_bzparams(params, bug_ids)
self.query_url = utils.get_bz_search_url(params)
if isinstance(self, Nag):
self.query_params = params
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
if chunk_size:
Bugzilla.BUGZILLA_CHUNK_SIZE = chunk_size
Bugzilla(
params,
bughandler=self.bughandler,
bugdata=bugs,
timeout=self.get_config("bz_query_timeout"),
).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
self.get_comments(bugs)
return bugs
def get_bugs(self, date="today", bug_ids=[], chunk_size=None):
"""Get the bugs"""
bugs = self.get_data()
params = self.get_bz_params(date)
self.amend_bzparams(params, bug_ids)
self.query_url = utils.get_bz_search_url(params)
if isinstance(self, Nag):
self.query_params = params
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
if chunk_size:
Bugzilla.BUGZILLA_CHUNK_SIZE = chunk_size
Bugzilla(
params,
bughandler=self.bughandler,
bugdata=bugs,
timeout=self.get_config("bz_query_timeout"),
).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
self.get_comments(bugs)
return bugs
if isinstance(self, Nag):
self.query_params = params
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
if chunk_size:
Bugzilla.BUGZILLA_CHUNK_SIZE = chunk_size
Bugzilla(
params,
bughandler=self.bughandler,
bugdata=bugs,
timeout=self.get_config("bz_query_timeout"),
).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
self.get_comments(bugs)
return bugs
assert "include_fields" not in params or params["include_fields"] == "id"
old_CHUNK_SIZE = Bugzilla.BUGZILLA_CHUNK_SIZE
try:
Bugzilla.BUGZILLA_CHUNK_SIZE = 7000
all_ids = []
def bughandler(bug):
all_ids.append(bug["id"])
params["include_fields"] = "id"
Bugzilla(params, bughandler=bughandler).get_data().wait()
finally:
Bugzilla.BUGZILLA_CHUNK_SIZE = old_CHUNK_SIZE
return all_ids