Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view/devices/deviceview.py
blob: 017fd58ba4f038e7d051468e1c5b83a50611481f (plain)
1
2
3
4
5
6
7
8
9
10
11
from sugar.graphics.canvasicon import CanvasIcon

def create(model):
    name = 'view.devices.' + model.get_type()

    mod = __import__(name)
    components = name.split('.')
    for comp in components[1:]:
        mod = getattr(mod, comp)

    return mod.DeviceView(model)