remove redundant test
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Tue, 2 May 2017 13:06:24 +0000 (15:06 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
The first part of the condition always evaluates to True since
it’s the precondition to entering that branch.

deltatar/deltatar.py

index b7cf6ad..71912b6 100644 (file)
@@ -1715,7 +1715,7 @@ class RestoreHelper(object):
 
         # when member is set, then we can assume everything is right and we
         # just have to restore the path
-        if not member:
+        if member is None:
             vol_no = file_data.get('volume', -1)
             # sanity check
             if not isinstance(vol_no, int) or vol_no < 0:
@@ -1724,7 +1724,7 @@ class RestoreHelper(object):
 
             # setup the volume that needs to be read. only needed when member is
             # not set
-            if not member and index_data['curr_vol_no'] != vol_no:
+            if index_data['curr_vol_no'] != vol_no:
                 index_data['curr_vol_no'] = vol_no
                 backup_path = os.path.dirname(index_data['path'])
                 vol_name = self._deltatar.volume_name_func(backup_path,