Skip to content

Commit 778bdab

Browse files
author
Tim Vaillancourt
committed
simplifying conditional
1 parent fd1c4e4 commit 778bdab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MongoBackup/Mongodumper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ def run(self):
132132
if backup['completed']:
133133
completed += 1
134134

135-
# fail if all threads did not complete
136-
if not completed == len(self.threads):
135+
# check if all threads completed
136+
if completed == len(self.threads):
137+
logging.info("All mongodump backups completed")
138+
else:
137139
raise Exception, "Not all mongodump threads completed successfully!", None
138140

139-
logging.info("All mongodump backups completed")
140-
141141
return self._summary
142142

143143
def close(self):

0 commit comments

Comments
 (0)