]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: fix Error() messages formatting
authorLoic Dachary <loic@dachary.org>
Mon, 30 Dec 2013 15:57:36 +0000 (16:57 +0100)
committerAlfredo Deza <alfredo@deza.pe>
Wed, 12 Feb 2014 21:17:11 +0000 (16:17 -0500)
Mainly using % instead of ,

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit b82ccfbfa786cd5436b48ec38276c5a48028ce1d)

src/ceph-disk

index 920a88947852fbc160b8953dbf6377f11fe0e25c..8b9c5c62e9310413be048177404bb921cf077314 100755 (executable)
@@ -514,7 +514,7 @@ def check_osd_id(osd_id):
     Ensures osd id is numeric.
     """
     if not re.match(r'^[0-9]+$', osd_id):
-        raise Error('osd id is not numeric')
+        raise Error('osd id is not numeric', osd_id)
 
 
 def allocate_osd_id(
@@ -1016,7 +1016,7 @@ def prepare_journal(
             raise Error('Journal is not a regular file', journal)
         return prepare_journal_dev(data, journal, journal_size, journal_uuid, journal_dm_keypath)
 
-    raise Error('Journal %s is neither a block device nor regular file', journal)
+    raise Error('Journal %s is neither a block device nor regular file' % journal)
 
 
 def adjust_symlink(target, path):
@@ -1811,7 +1811,7 @@ def main_activate(args):
     osd_id = None
 
     if not os.path.exists(args.path):
-        raise Error('%s does not exist', args.path)
+        raise Error('%s does not exist' % args.path)
 
     if is_suppressed(args.path):
         LOG.info('suppressed activate request on %s', args.path)
@@ -1833,7 +1833,7 @@ def main_activate(args):
                 init=args.mark_init,
                 )
         else:
-            raise Error('%s is not a directory or block device', args.path)
+            raise Error('%s is not a directory or block device' % args.path)
 
         start_daemon(
             cluster=cluster,
@@ -1849,11 +1849,11 @@ def main_activate(args):
 
 def get_journal_osd_uuid(path):
     if not os.path.exists(path):
-        raise Error('%s does not exist', path)
+        raise Error('%s does not exist' % path)
 
     mode = os.stat(path).st_mode
     if not stat.S_ISBLK(mode):
-        raise Error('%s is not a block device', path)
+        raise Error('%s is not a block device' % path)
 
     try:
         out = _check_output(
@@ -1877,7 +1877,7 @@ def get_journal_osd_uuid(path):
 
 def main_activate_journal(args):
     if not os.path.exists(args.dev):
-        raise Error('%s does not exist', args.dev)
+        raise Error('%s does not exist' % args.dev)
 
     cluster = None
     osd_id = None