summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2015-02-27 16:48:13 +0100
committerLars Wirzenius <liw@liw.fi>2015-03-22 14:07:22 +0200
commitfbe9fed84bd233b703f910eabbcd18b873e9145f (patch)
tree3c70155f40daa18c4ec06fa106094f8bd297661a
parente753aa4298c657ec507a1afb59a6e0f463f190e9 (diff)
downloadobnam-fbe9fed84bd233b703f910eabbcd18b873e9145f.tar.gz
remove uneeded outer parens around boolean expressions
-rw-r--r--obnamlib/plugins/show_plugin.py6
-rw-r--r--obnamlib/repo_dummy.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/obnamlib/plugins/show_plugin.py b/obnamlib/plugins/show_plugin.py
index 00d478d4..693a6d33 100644
--- a/obnamlib/plugins/show_plugin.py
+++ b/obnamlib/plugins/show_plugin.py
@@ -159,12 +159,12 @@ class ShowPlugin(obnamlib.ObnamPlugin):
# the repository is empty / the client does not exist
self.app.output.write('CRITICAL: no backup found.\n')
sys.exit(2)
- elif (now - most_recent > critical_age):
+ elif now - most_recent > critical_age:
self.app.output.write(
'CRITICAL: backup is old. last backup was %s.\n' %
(self.format_time(most_recent)))
sys.exit(2)
- elif (now - most_recent > warn_age):
+ elif now - most_recent > warn_age:
self.app.output.write(
'WARNING: backup is old. last backup was %s.\n' %
self.format_time(most_recent))
@@ -291,7 +291,7 @@ class ShowPlugin(obnamlib.ObnamPlugin):
enc_filename = enc_filename.replace(" ", "%20")
enc_filename = enc_filename.replace("\t", "%09")
- if (filename == "/"): return
+ if filename == "/": return
self.app.output.write("%s%s\t%d\t%#x\n" %
(mode_str, enc_filename, size, mtime_sec))
diff --git a/obnamlib/repo_dummy.py b/obnamlib/repo_dummy.py
index 3263a216..09664fee 100644
--- a/obnamlib/repo_dummy.py
+++ b/obnamlib/repo_dummy.py
@@ -222,7 +222,7 @@ class DummyClient(object):
return ('file', gen_id, filename)
def _is_filekey(self, key):
- return (type(key) is tuple and len(key) == 3 and key[0] == 'file')
+ return type(key) is tuple and len(key) == 3 and key[0] == 'file'
def file_exists(self, gen_id, filename):
return self.data.get_value(self._filekey(gen_id, filename), False)
@@ -248,7 +248,7 @@ class DummyClient(object):
return ('filekey', gen_id, filename, key)
def _is_filekeykey(self, key):
- return (type(key) is tuple and len(key) == 4 and key[0] == 'filekey')
+ return type(key) is tuple and len(key) == 4 and key[0] == 'filekey'
def _require_file(self, gen_id, filename):
if not self.file_exists(gen_id, filename):