From 0f2ebc6ee3825a13ea4c328354da96b6cfc93d63 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Wed, 10 Jul 2013 16:15:10 -0700 Subject: [PATCH] ceph.in, ceph_argparse.py: move descsort() to ceph_argparse Signed-off-by: Dan Mick --- src/ceph.in | 9 --------- src/pybind/ceph_argparse.py | 7 +++++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/ceph.in b/src/ceph.in index be0a512dd7d..a9d9f1bba9c 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -204,15 +204,6 @@ def do_help(parser, args, help_all = False): return 0 - -def descsort(sh1, sh2): - """ - sort descriptors by prefixes, defined as the concatenation of all simple - strings in the descriptor; this works out to just the leading strings. - """ - return cmp(concise_sig(sh1['sig']), concise_sig(sh2['sig'])) - - DONTSPLIT = string.letters + '{[<>]}' def wrap(s, width, indent): diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index 856c041f3cb..623a5a71d8b 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -582,6 +582,13 @@ def concise_sig(sig): s += d.helpstr() return s +def descsort(sh1, sh2): + """ + sort descriptors by prefixes, defined as the concatenation of all simple + strings in the descriptor; this works out to just the leading strings. + """ + return cmp(concise_sig(sh1['sig']), concise_sig(sh2['sig'])) + def parse_funcsig(sig): """ parse a single descriptor (array of strings or dicts) into a -- 2.47.3