diff --git a/PowerDiagram.py b/PowerDiagram.py index 3ab402e..def3298 100644 --- a/PowerDiagram.py +++ b/PowerDiagram.py @@ -9,8 +9,8 @@ import re import pygraphviz # port install py-pygraphviz from inventory import Inventory, MachineSpecIdNotFound -from SimpaDbUtil import SqlFile, SqlDatabaseReader -from Lib import SimpaDbUtil +from SimpaDbUtil import SqlFile, SqlDatabaseReader, TableAttrNotFound +# from Lib import SimpaDbUtil def add_capacity_constraints(capacity1, capacity2): @@ -265,7 +265,7 @@ class PowerConfig(object): rack_id, rack_slot_index = inventory.get_machine_rack_location(machine_name) machine.rack_id = rack_id machine.rack_slot_index = rack_slot_index - except SimpaDbUtil.TableAttrNotFound: + except TableAttrNotFound: pass if re.match('[a-z]+.._..', machine_name): diff --git a/inventory.py b/inventory.py index 2760ead..1fc0046 100644 --- a/inventory.py +++ b/inventory.py @@ -1,6 +1,7 @@ # encoding: utf-8 import datetime -from Lib import SimpaDbUtil +#from Lib import SimpaDbUtil +import SimpaDbUtil class MachineSpecIdNotFound(Exception):