From 1ffac73ed17fa70d0361e96a32a7980470d0f5e8 Mon Sep 17 00:00:00 2001 From: Glenn Hickey Date: Thu, 4 Apr 2024 16:09:29 -0400 Subject: [PATCH] clamp to int --- src/cactus/shared/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cactus/shared/common.py b/src/cactus/shared/common.py index ef26a64fb..f0fce5e7c 100644 --- a/src/cactus/shared/common.py +++ b/src/cactus/shared/common.py @@ -114,7 +114,7 @@ def cactus_override_toil_options(options): def cactus_clamp_memory(memory_bytes): """ use the environment variables from --maxMemory and --defaultMemory to clamp a given memory value """ - return max(min(int(os.environ['CACTUS_MAX_MEMORY']), memory_bytes), int(os.environ['CACTUS_DEFAULT_MEMORY'])) + return max(min(int(os.environ['CACTUS_MAX_MEMORY']), int(memory_bytes)), int(os.environ['CACTUS_DEFAULT_MEMORY'])) def makeURL(path_or_url): if urlparse(path_or_url).scheme == '':