From: duplo Date: Thu, 5 Feb 2009 14:09:45 +0000 (+0000) Subject: Read the type of the int from the value and create automatically the wizard informations X-Git-Tag: 2.1.0~409 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ad42262ffafdf46844bfbea6573691d2200600c2;p=bertos.git Read the type of the int from the value and create automatically the wizard informations git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2273 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index f224c6b0..3854f9f2 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -212,6 +212,12 @@ def loadConfigurationInfos(path): configurationInfos[name] = {} configurationInfos[name]["value"] = value configurationInfos[name]["informations"] = informations + if configurationInfos[name]["informations"]["type"] == "int" and configurationInfos[name]["value"].find("L") != -1: + configurationInfos[name]["informations"]["long"] = True + configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("L", "") + if configurationInfos[name]["informations"]["type"] == "int" and configurationInfos[name]["value"].find("U") != -1: + configurationInfos[name]["informations"]["unsigned"] = True + configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("U", "") configurationInfos[name]["description"] = description return configurationInfos except SyntaxError: @@ -301,7 +307,7 @@ def isLong(value): """ Return True if the value is a long. """ - if "long" not in value["informations"].keys() and value["informations"]["long"] and "unsigned" not in value["informations"].key(): + if "long" in value["informations"].keys() and value["informations"]["long"] and "unsigned" not in value["informations"].keys(): return True else: return False @@ -310,7 +316,7 @@ def isUnsigned(value): """ Return True if the value is an unsigned. """ - if "unsigned" not in value["informations"].keys() and value["informations"]["unsigned"] and "long" not in value["informations"].key(): + if "unsigned" in value["informations"].keys() and value["informations"]["unsigned"] and "long" not in value["informations"].keys(): return True else: return False