]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in, ceph_argparse.py: move descsort() to ceph_argparse
authorDan Mick <dan.mick@inktank.com>
Wed, 10 Jul 2013 23:15:10 +0000 (16:15 -0700)
committerDan Mick <dan.mick@inktank.com>
Thu, 11 Jul 2013 02:02:30 +0000 (19:02 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
src/ceph.in
src/pybind/ceph_argparse.py

index be0a512dd7d92de8baa30db1fc5e5dbaa253a331..a9d9f1bba9c8ee4ecdb34c6e0cde7cd1e39a4bb7 100755 (executable)
@@ -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):
index 856c041f3cb1c2bd7ea3ce61e3e7772151743f2d..623a5a71d8b436a26588250c3ce9505eb9202f56 100644 (file)
@@ -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