Skip to content

Commit c8d2ef4

Browse files
author
gau1991
committed
Improved error message
1 parent e543c95 commit c8d2ef4

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

ee/core/aptget.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ def update(self):
2626
if proc.returncode == 0:
2727
return True
2828
else:
29-
Log.debug(self, "Command Output: {0}, Command Error: {1}"
30-
.format(cmd_stdout, cmd_stderr))
29+
Log.error(self, "Unable to run apt-get update")
3130

3231
except Exception as e:
33-
Log.error(self, "Error, while installing packages, "
34-
"apt-get exited with status %s"
35-
% e)
32+
Log.error(self, "Error while installing packages, "
33+
"apt-get exited with error")
3634

3735
def dist_upgrade():
3836
"""
@@ -67,13 +65,11 @@ def install(self, packages):
6765
if proc.returncode == 0:
6866
return True
6967
else:
70-
Log.debug(self, "Command Output: {0}, Command Error: {1}"
71-
.format(cmd_stdout, cmd_stderr))
68+
Log.error(self, "Unable to run apt-get install")
7269

7370
except Exception as e:
74-
Log.error(self, "Error, while installing packages, "
75-
"apt-get exited with status %s"
76-
% e)
71+
Log.error(self, "Error while installing packages, "
72+
"apt-get exited with error")
7773

7874
def remove(self, packages, auto=False, purge=False):
7975
all_packages = ' '.join(packages)
@@ -93,13 +89,11 @@ def remove(self, packages, auto=False, purge=False):
9389
if proc.returncode == 0:
9490
return True
9591
else:
96-
Log.debug(self, "Command Output: {0}, Command Error: {1}"
97-
.format(cmd_stdout, cmd_stderr))
92+
Log.error(self, "Unable to run apt-get remove/purge")
9893

9994
except Exception as e:
100-
Log.error(self, "Error, while installing packages, "
101-
"apt-get exited with status %s"
102-
% e)
95+
Log.error(self, "Error while installing packages, "
96+
"apt-get exited with error")
10397

10498
def auto_clean(self):
10599
"""

0 commit comments

Comments
 (0)