diff options
| -rw-r--r-- | config.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -393,6 +393,9 @@ def _augment_sys_argv_from_loadfile(): newargs = [ arg.strip('\n') for arg in contents.split('\n') if 'config_savefile' not in arg ] + size = sys.getsizeof(newargs) + if size > 1024 * 1024: + raise Exception(f'Saved args are too large! ({size} bytes)') except Exception as e: raise Exception(f'Error reading {zkpath} from zookeeper.') from e SAVED_MESSAGES.append(f'Loaded config from zookeeper from {zkpath}') |
