X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Ftests%2Fselftest.py;h=88b95c0db650d8629726011e210c8745d929d3fd;hp=c14baffbb97c06ecff71da2e616f8343dd423de4;hb=787d1bc42c8b9cde309709f520e254e66a23ff8d;hpb=8c920b5c4b87fd8b54fd566c462c47f9e7f47693 diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index c14baff..88b95c0 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -1,4 +1,4 @@ -# Copyright (c) 2004-2020 mudpy authors. Permission to use, copy, +# Copyright (c) 2004-2021 mudpy authors. Permission to use, copy, # modify, and distribute this software is granted under terms # provided in the LICENSE file distributed with this software. @@ -546,7 +546,8 @@ def option_callback(telnet_socket, command, option): def check_debug(): if len(sys.argv) > 1: - config = yaml.safe_load(open(sys.argv[1])) + with open(sys.argv[1]) as config_fd: + config = yaml.safe_load(config_fd) return config.get(".mudpy.limit.debug", False) return False