Display gate results ordered
The OrderedDict type returned by `commentlink.getTestResults()` was lost when being passed to `_updateTestResults()`. This commit restores the order as it is supposed to be. Change-Id: Ie7fc7afd54a0243e4fe956b32061e98d743f7245
This commit is contained in:
parent
27f90d0b73
commit
913818beb6
@ -13,8 +13,13 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import collections
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
|
try:
|
||||||
|
import ordereddict
|
||||||
|
except:
|
||||||
|
pass
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
from six.moves.urllib import parse as urlparse
|
from six.moves.urllib import parse as urlparse
|
||||||
@ -29,6 +34,11 @@ from gertty.view import unified_diff as view_unified_diff
|
|||||||
from gertty.view import mouse_scroll_decorator
|
from gertty.view import mouse_scroll_decorator
|
||||||
import gertty.view
|
import gertty.view
|
||||||
|
|
||||||
|
try:
|
||||||
|
OrderedDict = collections.OrderedDict
|
||||||
|
except AttributeError:
|
||||||
|
OrderedDict = ordereddict.OrderedDict
|
||||||
|
|
||||||
class EditTopicDialog(mywid.ButtonDialog):
|
class EditTopicDialog(mywid.ButtonDialog):
|
||||||
signals = ['save', 'cancel']
|
signals = ['save', 'cancel']
|
||||||
def __init__(self, app, topic):
|
def __init__(self, app, topic):
|
||||||
@ -733,7 +743,8 @@ class ChangeView(urwid.WidgetWrap):
|
|||||||
for commentlink in self.app.config.commentlinks:
|
for commentlink in self.app.config.commentlinks:
|
||||||
results = commentlink.getTestResults(self.app, message.message)
|
results = commentlink.getTestResults(self.app, message.message)
|
||||||
if results:
|
if results:
|
||||||
result_system = result_systems.get(message.author.name, {})
|
result_system = result_systems.get(message.author.name,
|
||||||
|
OrderedDict())
|
||||||
result_systems[message.author.name] = result_system
|
result_systems[message.author.name] = result_system
|
||||||
result_system.update(results)
|
result_system.update(results)
|
||||||
skip = False
|
skip = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user