bmaptool: do not discover bmap if --nobmap was given
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 20 Dec 2012 11:20:56 +0000 (13:20 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 20 Dec 2012 11:23:44 +0000 (13:23 +0200)
Change-Id: Ia4dcfa3da319d079500b0849f07f52633534d464
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptool

index d68281b..4cd7e50 100755 (executable)
--- a/bmaptool
+++ b/bmaptool
@@ -112,11 +112,12 @@ def copy_command_open_all(args, log):
     # Open the bmap file. Try to discover the bmap file automatically if it
     # was not specified.
     bmap_path = args.bmap
-    if not bmap_path:
+    if not bmap_path and not args.nobmap:
         bmap_path = find_and_open_bmap(args.image)
         if bmap_path:
             log.info("discovered bmap file '%s'" % bmap_path)
 
+    bmap_obj = None
     if bmap_path:
         try:
             bmap_obj = TransRead.TransRead(bmap_path)