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:
Martin André 2016-06-27 16:54:07 +02:00
parent 27f90d0b73
commit 913818beb6
1 changed files with 12 additions and 1 deletions

View File

@ -13,8 +13,13 @@
# License for the specific language governing permissions and limitations
# under the License.
import collections
import datetime
import logging
try:
import ordereddict
except:
pass
import textwrap
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
import gertty.view
try:
OrderedDict = collections.OrderedDict
except AttributeError:
OrderedDict = ordereddict.OrderedDict
class EditTopicDialog(mywid.ButtonDialog):
signals = ['save', 'cancel']
def __init__(self, app, topic):
@ -733,7 +743,8 @@ class ChangeView(urwid.WidgetWrap):
for commentlink in self.app.config.commentlinks:
results = commentlink.getTestResults(self.app, message.message)
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_system.update(results)
skip = False