Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguz@sugarlabs.org>2012-03-09 14:41:07 (GMT)
committer Agustin Zubiaga <aguz@sugarlabs.org>2012-03-09 14:41:07 (GMT)
commitcac6d0ada180be22696598810337f2f8676508cb (patch)
treebe49bdfbcc216b8fb941c0d14a89e919cc5a3f3b /utils.py
parent7bfe9246498b483495f163536ff9f1f3385211f6 (diff)
In the XO-1 don't show the channel choose palette
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index eff333c..1781e42 100644
--- a/utils.py
+++ b/utils.py
@@ -86,3 +86,19 @@ def get_chart_file(activity_dir):
def get_decimals(number):
"""Returns the decimals count of a number"""
return str(len(number.split('.')[1]))
+
+
+def get_channels():
+ path = os.path.join('/sys/class/dmi/id', 'product_version')
+ try:
+ product = open(path).readline().strip()
+
+ except:
+ product = None
+
+ if product == '1' or product == '1.0':
+ return 1
+
+ else:
+ return 2
+