mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
package: Drop special error message handling for package errors
- We have new way to show extra details with exceptions in HTML. - This handling of error details in PackageException is mostly unused and unnecessary complexity. Tests: - Introduce exception into package.install() and package.uninstall() methods. Test that exceptions are being shown properly in Django error messages. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
28e417d7ef
commit
ade2d0c8f2
2 files changed
+1
-33
No files matched your search
@@ -275,18 +275,6 @@ class Packages(app_module.FollowerComponent):
|
||||
class PackageException(Exception):
|
||||
"""A package operation has failed."""
|
||||
|
||||
def __init__(self, error_string=None, error_details=None, *args, **kwargs):
|
||||
"""Store apt-get error string and details."""
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.error_string = error_string
|
||||
self.error_details = error_details
|
||||
|
||||
def __str__(self):
|
||||
"""Return the strin representation of the exception."""
|
||||
return 'PackageException(error_string="{0}", error_details="{1}")' \
|
||||
.format(self.error_string, self.error_details)
|
||||
|
||||
|
||||
class Transaction:
|
||||
"""Information about an ongoing transaction."""
|
||||
|
||||
Reference in new issue
Block a user