From c7c8711e823499d9c2e7b77cf9f18601584f2eaf Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 24 2017 12:39:53 +0000 Subject: Order the list of branches returned Signed-off-by: Pierre-Yves Chibon --- diff --git a/mdapi/__init__.py b/mdapi/__init__.py index dc85321..ae5b2da 100644 --- a/mdapi/__init__.py +++ b/mdapi/__init__.py @@ -270,12 +270,12 @@ def list_branches(request): ''' Return the list of all branches currently supported by mdapi ''' pretty = _get_pretty(request) - output = list(set([ + output = sorted(list(set([ # Remove the front part `mdapi-` and the end part -.sqlite filename.replace('mdapi-', '').rsplit('-', 2)[0].replace('-updates', '') for filename in os.listdir(CONFIG['DB_FOLDER']) if filename.startswith('mdapi') and filename.endswith('.sqlite') - ])) + ]))) args = {} if pretty: