BmapCopy.py: open the destination file for writing
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 20 Nov 2012 13:06:21 +0000 (15:06 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 20 Nov 2012 14:55:20 +0000 (16:55 +0200)
Open the destination file in write-only mode, because we only write to
this file, and never read from.

Change-Id: I5bdef84ecdb7faf38190a00bb34fb1b183fb9430
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptools/BmapCopy.py

index c579970..6d11247 100644 (file)
@@ -195,7 +195,7 @@ class BmapCopy:
         """ Open the destination file. """
 
         try:
-            self._f_dest = open(self._dest_path, 'w+')
+            self._f_dest = open(self._dest_path, 'w')
         except IOError as err:
             raise Error("cannot open destination file '%s': %s" \
                         % (self._dest_path, err))