mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Merge pull request #3526 from minrk/clusterlist
ensure 'default' is first in cluster profile list when sorting, 'default' is transformed to ''.
This commit is contained in:
commit
cefbcbead1
@ -87,7 +87,9 @@ class ClusterManager(LoggingConfigurable):
|
||||
|
||||
def list_profiles(self):
|
||||
self.update_profiles()
|
||||
result = [self.profile_info(p) for p in sorted(self.profiles.keys())]
|
||||
# sorted list, but ensure that 'default' always comes first
|
||||
default_first = lambda name: name if name != 'default' else ''
|
||||
result = [self.profile_info(p) for p in sorted(self.profiles, key=default_first)]
|
||||
return result
|
||||
|
||||
def check_profile(self, profile):
|
||||
|
Loading…
Reference in New Issue
Block a user