From 77fe7f916afb442a91b342d3f060567dc5d1070c Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Wed, 30 Aug 2017 17:07:04 -0500 Subject: [PATCH] Sort room names With a sizeable list of rooms managed by the bot, it can get a little hard to find a specific room in the list if they are added in random order. To make it a little easier to visually parse the list, sort the room names. Change-Id: Ia68c36346ea5fe542b6708a3f02ea911f348bc36 --- ptgbot/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ptgbot/db.py b/ptgbot/db.py index 1a0ee2c..20880ec 100644 --- a/ptgbot/db.py +++ b/ptgbot/db.py @@ -49,7 +49,7 @@ class PTGDataBase(): return room in self.data['rooms'] def list_rooms(self): - return self.data['rooms'] + return sorted(self.data['rooms']) def add_rooms(self, rooms): for room in rooms: