I changed the name of the configuration file, added one at the end, but the exception is not caught, why?
#!usr/bin/env python #coding:utf-8 import configparser config = confgparser.RawConfigParser() try: config.read('autogen_owen.cfg') except: print ("Отсутсвует конфигурационный файл") else: print (config.get('system', 'version')) 