Fixed regex issue in conditions for app sdk

This commit is contained in:
frikky
2021-08-24 12:02:25 +02:00
parent c4a06c92b9
commit 781efd8f55
2 changed files with 12 additions and 1 deletions
+11
View File
@@ -1748,6 +1748,17 @@ class AppBase:
except AttributeError as e: except AttributeError as e:
self.logger.error("[WARNING] Condition smaller than failed with values %s and %s: %s" % (sourcevalue, destinationvalue, e)) self.logger.error("[WARNING] Condition smaller than failed with values %s and %s: %s" % (sourcevalue, destinationvalue, e))
return False return False
elif check.lower() == "re" or check.lower() == "matches regex":
try:
found = re.search(destinationvalue, sourcevalue)
except re.error as e:
print("[WARNING] Regex error in condition: %s" % e)
return False
if found == None:
return False
return True
else: else:
self.logger.info("Condition: can't handle %s yet. Setting to true" % check) self.logger.info("Condition: can't handle %s yet. Setting to true" % check)
+1 -1
View File
@@ -3,7 +3,7 @@
### DEFAULT ### DEFAULT
NAME=shuffle-app_sdk NAME=shuffle-app_sdk
VERSION=0.9.06 VERSION=0.9.09
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION