forked from python-bugzilla/python-bugzilla
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbugzilla4.py
More file actions
47 lines (34 loc) · 1.3 KB
/
bugzilla4.py
File metadata and controls
47 lines (34 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
# Copyright (C) 2008-2012 Red Hat Inc.
# Author: Michal Novotny <[email protected]>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version. See http://www.gnu.org/copyleft/gpl.html for
# the full text of the license.
from .bugzilla3 import Bugzilla36
class Bugzilla4(Bugzilla36):
bz_ver_major = 4
bz_ver_minor = 0
#################
# Query Methods #
#################
def build_query(self, **kwargs):
query = Bugzilla36.build_query(self, **kwargs)
# 'include_fields' only available for Bugzilla4+
include_fields = self._convert_include_field_list(
kwargs.pop('include_fields', None))
if include_fields:
if 'id' not in include_fields:
include_fields.append('id')
query["include_fields"] = include_fields
exclude_fields = self._convert_include_field_list(
kwargs.pop('exclude_fields', None))
if exclude_fields:
query["exclude_fields"] = exclude_fields
return query
class Bugzilla42(Bugzilla4):
bz_ver_minor = 2
class Bugzilla44(Bugzilla42):
bz_ver_minor = 4