fix for FC releases that do not have pcitable file
[bootmanager.git] / source / merge_hw_tables.py
index 9d850d2..dfe3378 100755 (executable)
@@ -1,4 +1,11 @@
-#!/usr/bin/env python
+#!/usr/bin/python2
+
+# Copyright (c) 2003 Intel Corporation
+# All rights reserved.
+#
+# Copyright (c) 2004-2006 The Trustees of Princeton University
+# All rights reserved.
+
 
 """
 The point of this small utility is to take a file in the format
@@ -43,6 +50,7 @@ cciss 0e11:b060 0e11:b178
 
 import os, sys
 import string
+import StringIO
 
 PCI_ANY = 0xffffffffL
 
@@ -72,7 +80,7 @@ def merge_files(modules_dep_path, modules_pcimap_path, pcitable_path):
     except IOError:
         sys.stderr.write( "Unable to open pcitable: %s\n" %
                           pcitable_path )
-        return
+       pcitable_file=StringIO.StringIO()
 
     # associative array to store all matches of module -> ['vendor:device',..]
     # entries