Skip to content

Commit 573fb8a

Browse files
author
zhenwei-li
committed
适配 Python 2.7 规则(FileNotFoundError 无此内置类)
1 parent f722ad4 commit 573fb8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/com/dvsnier/config/cfg/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def __init__(self):
1717
def obtain_config(self, config_file):
1818
"""the read xxx.cfg"""
1919
if not config_file or not os.path.exists(config_file):
20-
raise FileNotFoundError('the current config path is not found.')
20+
raise IOError('the current config path is not found.')
2121
logging.info('the start parsing the configuration file that is {}'.format(os.path.abspath(config_file)))
2222
with open(config_file) as file_handler:
2323
lines = file_handler.readlines()

0 commit comments

Comments
 (0)