From cac6d0ada180be22696598810337f2f8676508cb Mon Sep 17 00:00:00 2001 From: Agustin Zubiaga Date: Fri, 09 Mar 2012 14:41:07 +0000 Subject: In the XO-1 don't show the channel choose palette --- (limited to 'utils.py') 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 + -- cgit v0.9.1