diff options
author | Pootle daemon <pootle@pootle.sugarlabs.org> | 2013-02-15 05:31:35 (GMT) |
---|---|---|
committer | Pootle daemon <pootle@pootle.sugarlabs.org> | 2013-02-15 05:31:35 (GMT) |
commit | 231b2dd249e35f83cd281b92e045860947a33169 (patch) | |
tree | 741698c84a81348f3358e26a9f7993c041ed6640 /TurtleArt/tautils.py | |
parent | 2f91b418395537b534624b1fd6fc3d75642c85e7 (diff) | |
parent | 6a3ec5d0b70cb46bc76c30a968cf2aaa6e4616d8 (diff) |
Merge branch 'master' of git.sugarlabs.org:turtleart/mainline
Diffstat (limited to 'TurtleArt/tautils.py')
-rw-r--r-- | TurtleArt/tautils.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.py index a8e372c..616ba81 100644 --- a/TurtleArt/tautils.py +++ b/TurtleArt/tautils.py @@ -42,8 +42,8 @@ except (ImportError, AttributeError): OLD_SUGAR_SYSTEM = True from StringIO import StringIO -from taconstants import (HIT_HIDE, HIT_SHOW, XO1, XO15, XO175, XO4, - UNKNOWN, MAGICNUMBER, SUFFIX) +from taconstants import (HIT_HIDE, HIT_SHOW, XO1, XO15, XO175, XO4, UNKNOWN, + MAGICNUMBER, SUFFIX) import logging _logger = logging.getLogger('turtleart-activity') @@ -717,7 +717,13 @@ def get_hardware(): elif version == '4': return XO4 else: - return UNKNOWN + # Older systems don't have dmi info + if os.path.exists('/sys/devices/platform/lis3lv02d/position'): + return XO175 + elif os.path.exists('/etc/olpc-release'): + return XO1 + else: + return UNKNOWN def _get_dmi(node): |