Skip to content

Commit 64d79de

Browse files
Whitespace cleanup again
1 parent 52fc5d9 commit 64d79de

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

mongodb_consistent_backup/Archive/Archive.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def init(self):
2828
raise e
2929

3030
def compression(self, method=None):
31-
if self._archiver:
32-
return self._archiver.compression(method)
31+
if self._archiver:
32+
return self._archiver.compression(method)
3333

3434
def threads(self, threads=None):
35-
if self._archiver:
36-
return self._archiver.threads(threads)
35+
if self._archiver:
36+
return self._archiver.threads(threads)
3737

3838
def archive(self):
3939
if self._archiver:

mongodb_consistent_backup/Archive/Tar/Tar.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@ def __init__(self, config, backup_base_dir):
2525
self.verbose = self.config.verbose
2626
self.binary = "tar"
2727
self.do_gzip = False
28-
self._pool = None
28+
self._pool = None
2929

3030
def compression(self, method=None):
31-
if method:
32-
self.config.archive.tar.compression = method.lower()
31+
if method:
32+
self.config.archive.tar.compression = method.lower()
3333
return self.config.archive.tar.compression
3434

3535
def threads(self, thread_count=None):
36-
if thread_count:
37-
self.config.archive.tar.threads = int(thread_count)
38-
logging.info("Setting tar thread count to: %i" % self.config.archive.tar.threads)
36+
if thread_count:
37+
self.config.archive.tar.threads = int(thread_count)
38+
logging.info("Setting tar thread count to: %i" % self.config.archive.tar.threads)
3939
if self.config.archive.tar.threads is None or self.config.archive.tar.threads < 1:
4040
self.config.archive.tar.threads = cpu_count()
41-
return int(self.config.archive.tar.threads)
41+
return int(self.config.archive.tar.threads)
4242

4343
def run(self):
4444
try:
@@ -69,7 +69,7 @@ def run(self):
6969
logging.info("Archiver threads completed")
7070

7171
def close(self):
72-
logging.debug("Stopping Archiver threads")
72+
logging.debug("Stopping Archiver threads")
7373
if self._pool is not None:
7474
self._pool.terminate()
7575
self._pool.join()

mongodb_consistent_backup/Main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def run(self):
158158
self.config,
159159
self.backup_root_directory,
160160
)
161-
except Exception, e:
161+
except Exception, e:
162162
raise e
163163

164164
if not self.is_sharded:
@@ -230,7 +230,7 @@ def run(self):
230230
self.secondaries,
231231
self.backup_root_directory
232232
)
233-
except Exception, e:
233+
except Exception, e:
234234
self.exception("Problem initializing oplog tailer! Error: %s" % e)
235235

236236
# init the backup

mongodb_consistent_backup/Oplog/Tailer/Tailer.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ def __init__(self, config, secondaries, base_dir):
2222

2323
def compression(self, method=None):
2424
if method:
25-
self.config.oplog.compression = method.lower()
26-
return self.config.oplog.compression
25+
self.config.oplog.compression = method.lower()
26+
return self.config.oplog.compression
2727

2828
def do_gzip(self):
29-
if self.compression() == 'gzip':
30-
return True
29+
if self.compression() == 'gzip':
30+
return True
3131
return False
3232

3333
def summary(self):

0 commit comments

Comments
 (0)