From: Sage Weil Date: Wed, 26 Apr 2017 14:27:20 +0000 (-0400) Subject: pybind/ceph_daemon: preserve ordering X-Git-Tag: v12.0.3~71^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dada2c5af045b2896518d2bf2a101be7d7e98e9b;p=ceph.git pybind/ceph_daemon: preserve ordering Signed-off-by: Sage Weil --- diff --git a/src/pybind/ceph_daemon.py b/src/pybind/ceph_daemon.py index 0979f396d9f8..234a1866e6f5 100755 --- a/src/pybind/ceph_daemon.py +++ b/src/pybind/ceph_daemon.py @@ -214,7 +214,7 @@ class DaemonWatcher(object): Get a possibly-truncated list of stats to display based on current terminal width. Allow breaking mid-section. ''' - current_fit = {} + current_fit = OrderedDict() if self.termsize.changed or not self._stats_that_fit: width = 0 for section_name, names in self._stats.items(): @@ -223,7 +223,7 @@ class DaemonWatcher(object): if width > self.termsize.cols: break if section_name not in current_fit: - current_fit[section_name] = {} + current_fit[section_name] = OrderedDict() current_fit[section_name][name] = stat_data if width > self.termsize.cols: break