~opencompute-developers/opencompute/checkbox

« back to all changes in this revision

Viewing changes to checkbox/parsers/submission.py

Updated OCP Checkbox to the final release version of Checkbox which is now in Legacy mode.

Also fixed some unittest failures found during the update.

Incremented release version to match the last release version of Checkbox.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# Copyright 2011 Canonical Ltd.
5
5
#
6
6
# Checkbox is free software: you can redistribute it and/or modify
7
 
# it under the terms of the GNU General Public License as published by
8
 
# the Free Software Foundation, either version 3 of the License, or
9
 
# (at your option) any later version.
 
7
# it under the terms of the GNU General Public License version 3,
 
8
# as published by the Free Software Foundation.
 
9
 
10
10
#
11
11
# Checkbox is distributed in the hope that it will be useful,
12
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
16
# You should have received a copy of the GNU General Public License
17
17
# along with Checkbox.  If not, see <http://www.gnu.org/licenses/>.
18
18
#
 
19
 
19
20
try:
20
21
    import xml.etree.cElementTree as etree
21
22
except ImportError:
22
23
    import cElementTree as etree
23
24
 
 
25
import re
 
26
 
24
27
from io import StringIO
25
28
from logging import getLogger
26
29
from pkg_resources import resource_string
119
122
        self.dispatcher.publishEvent("cpu", cpu)
120
123
 
121
124
    def addCpuArchitecture(self, cpu, architecture):
122
 
        if cpu["debian_name"] == architecture:
 
125
        regex = re.compile(cpu['regex'])
 
126
        if cpu["debian_name"] == architecture or regex.match(architecture):
123
127
            self.dispatcher.publishEvent("machine", cpu["gnu_name"])
124
128
            self.dispatcher.publishEvent("bits", cpu["bits"])
125
129