Browse Source

style: don't use continue for nothing

Antoine Beaupré 9 years ago
parent
commit
c2913f5f10
1 changed files with 4 additions and 5 deletions
  1. 4 5
      borg/converter.py

+ 4 - 5
borg/converter.py

@@ -39,11 +39,10 @@ class AtticRepositoryConverter(Repository):
         replace the 8 first bytes of all regular files in there."""
         for filename in segments:
             print("converting segment %s in place" % filename)
-            if dryrun:
-                continue
-            with open(filename, 'r+b') as segment:
-                segment.seek(0)
-                segment.write(MAGIC)
+            if not dryrun:
+                with open(filename, 'r+b') as segment:
+                    segment.seek(0)
+                    segment.write(MAGIC)
 
     def find_attic_keyfile(self):
         """find the attic keyfiles