[Yum-devel] [PATCH] Report IOError while setting self.conf. BZ 734907

Zdeněk Pavlas zpavlas at redhat.com
Mon Sep 5 11:37:43 UTC 2011


---
 cli.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cli.py b/cli.py
index 483108c..4a3d0c9 100755
--- a/cli.py
+++ b/cli.py
@@ -269,6 +269,10 @@ class YumBaseCli(yum.YumBase, output.YumOutput):
         except yum.Errors.ConfigError, e:
             self.logger.critical(_('Config Error: %s'), e)
             sys.exit(1)
+        except IOError, e:
+            e = '%s: %s' % (to_unicode(e.args[1]), repr(e.filename))
+            self.logger.critical(_('Config Error: %s'), e)
+            sys.exit(1)
         except ValueError, e:
             self.logger.critical(_('Options Error: %s'), e)
             sys.exit(1)
-- 
1.7.4.4



More information about the Yum-devel mailing list