fix an UnboundLocalError when the release file is empty #7773

This commit is contained in:
Benjamin Peterson 2010-01-25 03:31:13 +00:00
parent aab2401977
commit a43f34cc2a
4 changed files with 11 additions and 2 deletions

View file

@ -198,6 +198,7 @@ class PlatformTest(unittest.TestCase):
('Red Hat Enterprise Linux release 4 (Nahant)', ('Red Hat Enterprise Linux', '4', 'Nahant')),
('CentOS release 4', ('CentOS', '4', None)),
('Rocks release 4.2.1 (Cydonia)', ('Rocks', '4.2.1', 'Cydonia')),
('', ('', '', '')), # If there's nothing there.
):
self.assertEqual(platform._parse_release_file(input), output)