From: Alfredo Deza Date: Wed, 5 Feb 2014 16:41:44 +0000 (-0500) Subject: remove useless if dry run conditions X-Git-Tag: v1.3.5~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5059b4cac4b4ad554e9eb800c166062688988268;p=ceph-deploy.git remove useless if dry run conditions Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/new.py b/ceph_deploy/new.py index 9607c3f..0be8ceb 100644 --- a/ceph_deploy/new.py +++ b/ceph_deploy/new.py @@ -144,30 +144,28 @@ def new(args): ) LOG.debug('Writing initial config to %s...', path) - if not args.dry_run: - tmp = '%s.tmp' % path - with file(tmp, 'w') as f: - cfg.write(f) - try: - os.rename(tmp, path) - except OSError as e: - if e.errno == errno.EEXIST: - raise exc.ClusterExistsError(path) - else: - raise + tmp = '%s.tmp' % path + with file(tmp, 'w') as f: + cfg.write(f) + try: + os.rename(tmp, path) + except OSError as e: + if e.errno == errno.EEXIST: + raise exc.ClusterExistsError(path) + else: + raise LOG.debug('Writing monitor keyring to %s...', keypath) - if not args.dry_run: - tmp = '%s.tmp' % keypath - with file(tmp, 'w') as f: - f.write(mon_keyring) - try: - os.rename(tmp, keypath) - except OSError as e: - if e.errno == errno.EEXIST: - raise exc.ClusterExistsError(keypath) - else: - raise + tmp = '%s.tmp' % keypath + with file(tmp, 'w') as f: + f.write(mon_keyring) + try: + os.rename(tmp, keypath) + except OSError as e: + if e.errno == errno.EEXIST: + raise exc.ClusterExistsError(keypath) + else: + raise @priority(10)