]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
allow an optional patch kwarg to check_call
authorAlfredo Deza <alfredo@deza.pe>
Thu, 15 Aug 2013 13:56:17 +0000 (09:56 -0400)
committerAlfredo Deza <alfredo@deza.pe>
Thu, 15 Aug 2013 13:56:17 +0000 (09:56 -0400)
Signed-off-by: Alfredo Deza <alfredo@deza.pe>
ceph_deploy/util/wrappers.py

index 2bbb2fc89653f6e4a21db687d2cf2d480fd493c7..4bff77b5657b6ea0ac484359fb93d3a804362451 100644 (file)
@@ -22,6 +22,7 @@ def check_call(conn, logger, args, *a, **kw):
     :param args: The args to be passed onto ``check_call``
     """
     command = ' '.join(args)
+    patch = kw.pop('patch', True)  # Always patch unless explicitly told to
     logger.info('Running command: %s' % command)
 
     def remote_call(args, *a, **kw):
@@ -32,7 +33,7 @@ def check_call(conn, logger, args, *a, **kw):
             **kw
         )
 
-    with context.remote(conn, logger, remote_call, mangle_exc=False) as call:
+    with context.remote(conn, logger, remote_call, mangle_exc=False, patch=patch) as call:
         try:
             return call(args, *a, **kw)
         except Exception as err: