From c8d2ef49ddbde0157f4879c2201e5b4e1faa7d6e Mon Sep 17 00:00:00 2001 From: gau1991 Date: Wed, 11 Mar 2015 19:16:30 +0530 Subject: [PATCH] Improved error message --- ee/core/aptget.py | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/ee/core/aptget.py b/ee/core/aptget.py index 57c060f2..12883fd3 100644 --- a/ee/core/aptget.py +++ b/ee/core/aptget.py @@ -26,13 +26,11 @@ class EEAptGet(): if proc.returncode == 0: return True else: - Log.debug(self, "Command Output: {0}, Command Error: {1}" - .format(cmd_stdout, cmd_stderr)) + Log.error(self, "Unable to run apt-get update") except Exception as e: - Log.error(self, "Error, while installing packages, " - "apt-get exited with status %s" - % e) + Log.error(self, "Error while installing packages, " + "apt-get exited with error") def dist_upgrade(): """ @@ -67,13 +65,11 @@ class EEAptGet(): if proc.returncode == 0: return True else: - Log.debug(self, "Command Output: {0}, Command Error: {1}" - .format(cmd_stdout, cmd_stderr)) + Log.error(self, "Unable to run apt-get install") except Exception as e: - Log.error(self, "Error, while installing packages, " - "apt-get exited with status %s" - % e) + Log.error(self, "Error while installing packages, " + "apt-get exited with error") def remove(self, packages, auto=False, purge=False): all_packages = ' '.join(packages) @@ -93,13 +89,11 @@ class EEAptGet(): if proc.returncode == 0: return True else: - Log.debug(self, "Command Output: {0}, Command Error: {1}" - .format(cmd_stdout, cmd_stderr)) + Log.error(self, "Unable to run apt-get remove/purge") except Exception as e: - Log.error(self, "Error, while installing packages, " - "apt-get exited with status %s" - % e) + Log.error(self, "Error while installing packages, " + "apt-get exited with error") def auto_clean(self): """