Skip to content

Commit

Permalink
Implements dropbox#142: Sorted Attributes In List Command
Browse files Browse the repository at this point in the history
  • Loading branch information
Narayanan Seshan committed Sep 1, 2017
1 parent bef55a2 commit a7428c7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pynsot/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ def format_field(self, field, field_data):
elif field == 'change_at': # Timestamp
field_data = self.format_timestamp(field_data)

elif field == 'attributes':
field_data = field_data.split('\n')
field_data.sort()
field_data = '\n'.join(field_data)

return field_data

def format_object_for_grep(self, obj):
Expand Down

0 comments on commit a7428c7

Please sign in to comment.