We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69d1f64 commit bd6ccfbCopy full SHA for bd6ccfb
tests/conf/test_parser.py
@@ -66,3 +66,17 @@ def test_empty_option(self):
66
conf.config_file_path = FN
67
conf.read()
68
self.assertEqual(conf.reposdir, '')
69
+
70
+ def test_iterator_segfault(self):
71
+ # https://bugzilla.redhat.com/show_bug.cgi?id=2330562
72
+ empty_conf_path = tests.support.resource_path('etc/empty.conf')
73
74
+ parser = ConfigParser()
75
+ parser.read(empty_conf_path)
76
+ self.assertTrue(parser.hasSection("main"))
77
78
+ sectObj = parser.getData()["main"]
79
+ [item for item in sectObj]
80
81
+ # this should not segfault
82
+ [item for item in iter(sectObj)]
0 commit comments