Skip to content

Commit

Permalink
Configurations: * Backwards compatibility with old style config-sheet…
Browse files Browse the repository at this point in the history
… header: 'Assembly4 configuration table'
  • Loading branch information
Thowil committed Feb 15, 2022
1 parent 9de746f commit acc532a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions configurationEngine.py
Expand Up @@ -15,7 +15,7 @@

import Asm4_libs as Asm4

ASM4_CONFIG_TYPE = 'Asm4::ConfigurationTable'
ASM4_CONFIG_TYPE = ['Asm4::ConfigurationTable', 'Assembly4 configuration table']
HEADER_CELL = 'A1'
DESCRIPTION_CELL = 'A2'
OBJECTS_START_ROW = '5'
Expand Down Expand Up @@ -50,7 +50,7 @@ def createConfig(name, description):
conf = group.newObject('Spreadsheet::Sheet', name)
headerRow = str(int(OBJECTS_START_ROW)-1)
#conf.set(HEADER_CELL, 'Assembly4 configuration table')
conf.set(HEADER_CELL, ASM4_CONFIG_TYPE)
conf.set(HEADER_CELL, ASM4_CONFIG_TYPE[0])
conf.set(DESCRIPTION_CELL, str(description))
conf.set(OBJECT_NAME_COL + headerRow, 'ObjectName')
conf.set(OBJECT_VISIBLE_COL + headerRow, 'Visible')
Expand Down Expand Up @@ -524,7 +524,7 @@ def restoreObject(conf, obj):
+-----------------------------------------------+
"""
def isAsm4Config(sheet):
if sheet and sheet.TypeId=='Spreadsheet::Sheet' and sheet.get(HEADER_CELL)==ASM4_CONFIG_TYPE:
if sheet and sheet.TypeId == 'Spreadsheet::Sheet' and sheet.get(HEADER_CELL) in ASM4_CONFIG_TYPE:
return True
else:
return False
Expand Down

0 comments on commit acc532a

Please sign in to comment.