]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: filter out empty lines from osdids()
authorSage Weil <sage@inktank.com>
Wed, 12 Jun 2013 21:54:10 +0000 (14:54 -0700)
committerSage Weil <sage@inktank.com>
Wed, 12 Jun 2013 21:54:10 +0000 (14:54 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph.in

index 4e899ce0f75a8208bfc22fa44a8badb9d0dd2d47..1a3eec2f62fedfa2e654ea80c7df1a32dfdfb634 100755 (executable)
@@ -781,7 +781,7 @@ def osdids():
     ret, outbuf, outs = json_command(prefix='osd ls')
     if ret:
         raise RuntimeError('Can\'t contact mon for osd list')
-    return [i for i in outbuf.split('\n')]
+    return [i for i in outbuf.split('\n') if i != '']
 
 def monids():
     ret, outbuf, outs = json_command(prefix='mon dump',