Skip to content

Commit

Permalink
Remove unused error classes. (#595)
Browse files Browse the repository at this point in the history
* Remove unused error classes.

* Remove AuthenticationError, ExportError, FetchError.
  • Loading branch information
bdice authored and vyasr committed Apr 19, 2022
1 parent 79994eb commit 2c1a455
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
25 changes: 0 additions & 25 deletions signac/common/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,3 @@ class ConfigError(Error, RuntimeError):
"""Error with parsing or reading a configuration file."""

pass


# this class is only used by deprecated features
class AuthenticationError(Error, RuntimeError):
"""Authentication error."""

def __str__(self):
if len(self.args) > 0:
return f"Failed to authenticate with host '{self.args[0]}'."
else:
return "Failed to authenticate with host."


# this class is only used by deprecated features
class ExportError(Error, RuntimeError):
"""Error exporting documents to a mirror."""

pass


# this class is only used by deprecated features
class FetchError(FileNotFoundError):
"""Error in fetching data."""

pass
5 changes: 1 addition & 4 deletions signac/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# exceptions that are relevant beyond a single module. This top-level errors
# module is used to expose user-facing exception classes.

from .common.errors import AuthenticationError, ConfigError, ExportError, FetchError
from .common.errors import ConfigError
from .contrib.errors import (
DestinationExistsError,
IncompatibleSchemaVersion,
Expand Down Expand Up @@ -59,13 +59,10 @@ def __str__(self):


__all__ = [
"AuthenticationError",
"ConfigError",
"DestinationExistsError",
"DocumentSyncConflict",
"Error",
"ExportError",
"FetchError",
"FileSyncConflict",
"IncompatibleSchemaVersion",
"InvalidKeyError",
Expand Down

0 comments on commit 2c1a455

Please sign in to comment.