Merge "ASM #539 Multiple flag functionality for textdb is not working properly" into asm_14.3.1
Former-commit-id:e8f6419c58
[formerly8e65a175fc
] [formerly8ebfa3edce
] [formerlyfdfe97c659
[formerly8ebfa3edce
[formerly 764e268bcccec4a805509a11fbd9c9f4e1860842]]] Former-commit-id:fdfe97c659
Former-commit-id: 41fb35543dbdb436ebfeb91a8deb193d2c5c92c4 [formerlyf70ccec42e
] Former-commit-id:d67d2d9f04
This commit is contained in:
commit
a098a1ca4e
1 changed files with 20 additions and 25 deletions
|
@ -1,19 +1,19 @@
|
||||||
##
|
##
|
||||||
# This software was developed and / or modified by Raytheon Company,
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
#
|
#
|
||||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
# This software product contains export-restricted data whose
|
# This software product contains export-restricted data whose
|
||||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
# to non-U.S. persons whether in the United States or abroad requires
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
# an export license or other authorization.
|
# an export license or other authorization.
|
||||||
#
|
#
|
||||||
# Contractor Name: Raytheon Company
|
# Contractor Name: Raytheon Company
|
||||||
# Contractor Address: 6825 Pine Street, Suite 340
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
# Mail Stop B8
|
# Mail Stop B8
|
||||||
# Omaha, NE 68106
|
# Omaha, NE 68106
|
||||||
# 402.291.0100
|
# 402.291.0100
|
||||||
#
|
#
|
||||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
# further licensing information.
|
# further licensing information.
|
||||||
##
|
##
|
||||||
|
@ -59,6 +59,7 @@ import conf.TDBConfig as config
|
||||||
# 12/07/10 7656 cjeanbap Retrieve environment variable.
|
# 12/07/10 7656 cjeanbap Retrieve environment variable.
|
||||||
# 04/07/11 8686 cjeanbap Fixed $ACTION has -i associated
|
# 04/07/11 8686 cjeanbap Fixed $ACTION has -i associated
|
||||||
# 05/12/14 16954 kshrestha Added Multiple flag functionality for textdb
|
# 05/12/14 16954 kshrestha Added Multiple flag functionality for textdb
|
||||||
|
# 08/15/14 2926 bclement Fixed hasSubOperations()
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class TextDB:
|
class TextDB:
|
||||||
|
|
||||||
|
@ -470,27 +471,21 @@ class TextDB:
|
||||||
sm.execute()
|
sm.execute()
|
||||||
|
|
||||||
# Determine if command line has sub operations
|
# Determine if command line has sub operations
|
||||||
|
# Returns true if any flags in self.commands[CL.DEFAULT_KEY]
|
||||||
|
# are in config.mayJoin
|
||||||
#
|
#
|
||||||
# raise:
|
|
||||||
# propagates any exception received
|
|
||||||
def __hasSubOperations(self):
|
def __hasSubOperations(self):
|
||||||
for key in self.commands.keys():
|
for key in self.commands.keys():
|
||||||
if key is CL.DEFAULT_KEY:
|
if key is CL.DEFAULT_KEY:
|
||||||
subJoins = self.commands.get(key)
|
flags = self.commands.get(key)
|
||||||
length = len(self.commands.get(key))
|
|
||||||
#specifically looking for config.flags of subJoins
|
#specifically looking for config.flags of subJoins
|
||||||
if length <= 6:
|
for flag in flags:
|
||||||
for pos in range(0, length, 2):
|
configFlag = config.flags.get(flag)
|
||||||
value = config.flags.get(subJoins[pos])[0]
|
# some flags aren't in configs.flags
|
||||||
try:
|
if configFlag and configFlag[0] in config.mayJoin:
|
||||||
config.mayJoin.index(value)
|
|
||||||
except:
|
|
||||||
raise CL.ArgError("Invalid command count - JOIN command includes invalid option(s)")
|
|
||||||
return True
|
return True
|
||||||
else:
|
return False
|
||||||
return False
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
# Correct the sub operational command line .
|
# Correct the sub operational command line .
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue