From b27a8ff7442559409fe005ef721bc855b5512e3c Mon Sep 17 00:00:00 2001 From: Jiri Moskovcak Date: Tue, 25 Jan 2011 22:58:42 +0100 Subject: don't try to remove the tmp dir if it's not created - if no package is found the tmp dir is not created, but we tried to remove it anyway which failed --- src/plugins/abrt-action-install-debuginfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/abrt-action-install-debuginfo.py') diff --git a/src/plugins/abrt-action-install-debuginfo.py b/src/plugins/abrt-action-install-debuginfo.py index b16cc3e9..d59d0e5f 100755 --- a/src/plugins/abrt-action-install-debuginfo.py +++ b/src/plugins/abrt-action-install-debuginfo.py @@ -210,7 +210,7 @@ class DebugInfoDownload(YumBase): installed_size += float(pkg[0].installedsize) total_pkgs += 1 - log2("found pkg for %s" % debuginfo_path) + log2("found pkg for %s : %s" % (debuginfo_path, pkg[0])) else: log2("not found pkg for %s" % debuginfo_path) not_found.append(debuginfo_path) @@ -271,13 +271,13 @@ class DebugInfoDownload(YumBase): downloaded_pkgs += 1 - if not self.keeprpms: + if not self.keeprpms and os.path.exists(self.tmpdir): print (_("All downloaded packages have been extracted, removing %s") % self.tmpdir) try: os.rmdir(self.tmpdir) except OSError: - print _("Can't remove %s, probably contains an error log") + print _("Can't remove %s, probably contains an error log" % self.tmpdir) verbose = 0 def log1(message): -- cgit