Skip to content

Commit 93f08cb

Browse files
Raise OperationError instead of logging+sys.exit()
1 parent 054aa7a commit 93f08cb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mongodb_consistent_backup/Backup/Mongodump/Mongodump.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
import logging
3-
import sys
43

54
from math import floor
65
from subprocess import check_output
@@ -71,8 +70,7 @@ def can_gzip(self):
7170
return True
7271
return False
7372
else:
74-
logging.fatal("Cannot find or execute the mongodump binary file %s!" % self.binary)
75-
sys.exit(1)
73+
raise OperationError("Cannot find or execute the mongodump binary file %s!" % self.binary)
7674

7775
def summary(self):
7876
return self._summary

0 commit comments

Comments
 (0)