From b0794ff5f6bd1e1c9e93f68f6bb7a13f683ab94c Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 30 Apr 2013 09:26:04 -0400 Subject: [PATCH] Test for the existance of a file that might not be present on older RHEL. --- system/setup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/setup b/system/setup index 27961e3ad6a..6f99d3ac2b6 100644 --- a/system/setup +++ b/system/setup @@ -1096,7 +1096,9 @@ class LinuxNetwork(Network): primary = open(os.path.join(path, 'bonding', 'primary')).read() if primary: interfaces[device]['primary'] = primary - interfaces[device]['all_slaves_active'] = open(os.path.join(path, 'bonding', 'all_slaves_active')).read() == '1' + path = os.path.join(path, 'bonding', 'all_slaves_active') + if os.path.exists(path): + interfaces[device]['all_slaves_active'] = open(path).read() == '1' output = subprocess.Popen(['/sbin/ip', 'addr', 'show', device], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] for line in output.split('\n'):