Skip to content

Commit

Permalink
Merge 0163bd6 into 11b7aeb
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Jul 14, 2021
2 parents 11b7aeb + 0163bd6 commit 8d5c661
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
35 changes: 24 additions & 11 deletions daliuge-translator/dlg/dropmake/pg_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,19 +300,32 @@ def is_start_listener(self):
)

def is_group_start(self):
return (
self.has_group()
and "group_start" in self.jd
and 1 == int(self.jd["group_start"])
)
result = False
if self.has_group() \
and "group_start" in self.jd:
gs = self.jd["group_start"]
if type(gs) == type(True):
result = gs
elif type(gs) in [type(1), type(1.)]:
result = (1 == gs)
elif type(gs) == type("s"):
result = gs.lower() in ("true", "1")
return result

def is_group_end(self):
return (
self.has_group()
and "group_end" in self.jd
and 1 == int(self.jd["group_end"])
)

def is_group_end(self):
result = False
if self.has_group() \
and "group_end" in self.jd:
ge = self.jd["group_end"]
if type(ge) == type(True):
result = ge
elif type(ge) in [type(1), type(1.)]:
result = (1 == ge)
elif type(ge) == type("s"):
result = ge.lower() in ("true", "1")
return result

def is_group(self):
return self._isgrp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@
{
"text": "Group Start",
"name": "group_start",
"value": 1,
"value": true,
"description": ""
},
{
Expand Down Expand Up @@ -2556,7 +2556,7 @@
{
"text": "Group End",
"name": "group_end",
"value": 1,
"value": true,
"description": ""
}
]
Expand Down

0 comments on commit 8d5c661

Please sign in to comment.