summaryrefslogtreecommitdiffstats
path: root/pyinventorymgr
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2016-08-30 20:06:23 -0400
committerPatrick Williams <patrick@stwcx.xyz>2016-09-06 12:46:19 +0000
commit985b2a51ee2e3005330d874c1da46c639f85261c (patch)
tree70c68d2ecd63814feb16eb680d15252add581350 /pyinventorymgr
parentc91b0bfd5bc748c2b22dd226ab1d064235d08e4f (diff)
downloadtalos-skeleton-985b2a51ee2e3005330d874c1da46c639f85261c.tar.gz
talos-skeleton-985b2a51ee2e3005330d874c1da46c639f85261c.zip
inventory: allow missing config file
Allow the inventory manager to start with a missing board config file. Change-Id: Ifd0e2080348de6ed802505a26c85ddebf355d3c4 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'pyinventorymgr')
-rw-r--r--pyinventorymgr/inventory_items.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/pyinventorymgr/inventory_items.py b/pyinventorymgr/inventory_items.py
index 67a6838..d6d3d1d 100644
--- a/pyinventorymgr/inventory_items.py
+++ b/pyinventorymgr/inventory_items.py
@@ -6,11 +6,20 @@ import dbus.service
import dbus.mainloop.glib
import obmc.dbuslib.propertycacher as PropertyCacher
from obmc.dbuslib.bindings import get_dbus, DbusProperties, DbusObjectManager
-import obmc_system_config as System
+
+try:
+ import obmc_system_config as System
+ have_system = True
+except ImportError:
+ have_system = False
INTF_NAME = 'org.openbmc.InventoryItem'
DBUS_NAME = 'org.openbmc.Inventory'
-FRUS = System.FRU_INSTANCES
+
+if have_system:
+ FRUS = System.FRU_INSTANCES
+else:
+ FRUS = {}
class Inventory(DbusProperties, DbusObjectManager):
OpenPOWER on IntegriCloud