Author: reinhard Date: 2010-11-14 12:36:34 -0600 (Sun, 14 Nov 2010) New Revision: 10239
Modified: trunk/gnue-common/ trunk/gnue-common/src/apps/GBaseApp.py trunk/gnue-common/src/datasources/GConditions.py Log: Run with Python 2.4 so nightlies can be generated on ash, removed some check for older Python versions. Property changes on: trunk/gnue-common ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2010-11-14 14:00:53.595999956 +0100 committer: Reinhard Müller <[email protected]> properties: branch-nick: common + timestamp: 2010-11-14 19:35:32.653000116 +0100 committer: Reinhard Müller <[email protected]> properties: branch-nick: common Name: bzr:file-ids - setup.py 9...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:setup.py src/base/setup.py 9...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fbase%2Fsetup.py + src/apps/GBaseApp.py 1...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fapps%2FGBaseApp.py src/datasources/GConditions.py 1...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2FGConditions.py Name: bzr:revision-id:v4 - 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] + 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] 3137 [email protected] 3138 [email protected] 3139 [email protected] 3140 [email protected] Name: bzr:text-parents - setup.py [email protected] src/base/setup.py [email protected] + src/apps/GBaseApp.py [email protected] src/datasources/GConditions.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 Modified: trunk/gnue-common/src/apps/GBaseApp.py =================================================================== --- trunk/gnue-common/src/apps/GBaseApp.py 2010-11-14 18:34:58 UTC (rev 10238) +++ trunk/gnue-common/src/apps/GBaseApp.py 2010-11-14 18:36:34 UTC (rev 10239) @@ -229,7 +229,7 @@ os.path.join(paths.config, "connections.conf")) ] # Python version check - if not hasattr(sys, 'hexversion') or sys.hexversion < 0x02050000: + if not hasattr(sys, 'hexversion') or sys.hexversion < 0x02040000: msg = u_("This application requires Python 2.5 or greater.") if hasattr(sys, 'version'): msg = u_("This application requires Python 2.5 or greater. " Modified: trunk/gnue-common/src/datasources/GConditions.py =================================================================== --- trunk/gnue-common/src/datasources/GConditions.py 2010-11-14 18:34:58 UTC (rev 10238) +++ trunk/gnue-common/src/datasources/GConditions.py 2010-11-14 18:36:34 UTC (rev 10239) @@ -27,8 +27,7 @@ import re import sys import datetime -if sys.hexversion >= 0x02040000: - import decimal +import decimal from gnue.common.base import errors @@ -1724,8 +1723,7 @@ newValue = 0L # Boolean to Decimal - elif sys.hexversion >= 0x02040000 \ - and isinstance (chkValue, decimal.Decimal): + elif isinstance (chkValue, decimal.Decimal): if oldValue: newValue = decimal.Decimal(1) else: @@ -1754,8 +1752,7 @@ newValue = long (oldValue) # Integer to Decimal - elif sys.hexversion >= 0x02040000 \ - and isinstance (chkValue, decimal.Decimal): + elif isinstance (chkValue, decimal.Decimal): newValue = decimal.Decimal (oldValue) else: raise ConversionRuleError, (oldValue, chkValue) @@ -1776,15 +1773,13 @@ newValue = float (oldValue) # Long to Decimal - elif sys.hexversion >= 0x02040000 \ - and isinstance (chkValue, decimal.Decimal): + elif isinstance (chkValue, decimal.Decimal): newValue = decimal.Decimal (oldValue) else: raise ConversionRuleError, (oldValue, chkValue) # Decimal conversion (Python 2.4 or later) - elif sys.hexversion >= 0x02040000 \ - and (isinstance (v1, decimal.Decimal) \ + elif (isinstance (v1, decimal.Decimal) \ or isinstance (v2, decimal.Decimal)): if isinstance (v1, decimal.Decimal): _______________________________________________ commit-gnue mailing list [email protected] http://lists.gnu.org/mailman/listinfo/commit-gnue
