diff options
| author | Michael E Brown <michael_e_brown@dell.com> | 2007-06-14 11:53:57 -0500 |
|---|---|---|
| committer | Michael E Brown <michael_e_brown@dell.com> | 2007-06-14 11:53:57 -0500 |
| commit | 06cc03463a6e71aa781d280e1e8620146dd46841 (patch) | |
| tree | 568fd943f7bcc32d85791e1f9915a4dec6998acf | |
| parent | 6533774ebda67addfb6e701246f3a96c5e62bcd9 (diff) | |
no need to recreate yum.conf symlink if it already exists
| -rw-r--r-- | mock.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -717,10 +717,8 @@ class Root: yumdir = os.path.join(self.rootdir, 'etc', 'yum') self._ensure_dir(yumdir) yumlink = os.path.join(yumdir, 'yum.conf') - if os.path.exists(yumlink): - cmd = '%s -rf %s' % (self.config['rm'], yumlink) - (retval, output) = self.do(cmd) - os.symlink('../yum.conf', yumlink) + if not os.path.exists(yumlink): + os.symlink('../yum.conf', yumlink) if self.config.setdefault('use_host_resolv', True) == True: resolvdir = os.path.join(self.rootdir, 'etc') |
