Skip to content

Commit

Permalink
Merge da59c17 into 11b7aeb
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Jul 14, 2021
2 parents 11b7aeb + da59c17 commit fa16e55
Showing 1 changed file with 24 additions and 11 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

0 comments on commit fa16e55

Please sign in to comment.