summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-03-20 13:27:27 +0100
committerSage Weil <sage@inktank.com>2013-04-26 13:40:05 -0700
commit9464284f3ac9737345c595847e165db48adc0a70 (patch)
treecfe48bcb0825399b10fc3d1aaa2c3bb67bbf74fa
parent01152115f7bf4a307296c9126174ce09bb0ce22d (diff)
downloadceph-9464284f3ac9737345c595847e165db48adc0a70.tar.gz
ceph-disk: fix except to catch OSError
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de> (cherry picked from commit 9daf6cfce2d57509d896eae28bb97146a682a306)
-rwxr-xr-xsrc/ceph-disk6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ceph-disk b/src/ceph-disk
index abba6f53a92..9081ca93b47 100755
--- a/src/ceph-disk
+++ b/src/ceph-disk
@@ -786,7 +786,7 @@ def prepare_dir(
else:
try:
os.unlink(os.path.join(path, 'journal_dmcrypt'))
- except:
+ except OSError:
pass
write_one_line(path, 'ceph_fsid', cluster_uuid)
@@ -1273,7 +1273,7 @@ def mount_activate(
parent_dev = os.stat('/var/lib/ceph/osd').st_dev
if dst_dev != parent_dev:
other = True
- except:
+ except OSError:
pass
if active:
log.info('%s osd.%s already mounted in position; unmounting ours.' % (cluster, osd_id))
@@ -1429,7 +1429,7 @@ def activate(
if other != init:
try:
os.unlink(os.path.join(path, other))
- except:
+ except OSError:
pass
if not os.path.exists(os.path.join(path, 'active')):