-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TileSourceFileNotFoundError when a file is attempted to be opened that doesn't exist. This is a subclass of both TileSourceError and FileNotFoundError. Renaming exceptions to errors follows standard Python naming conventions. Old names are still available for compatibility.
- Loading branch information
Showing
24 changed files
with
217 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
class TileGeneralException(Exception): | ||
import errno | ||
|
||
|
||
class TileGeneralError(Exception): | ||
pass | ||
|
||
|
||
class TileSourceException(TileGeneralException): | ||
class TileSourceError(TileGeneralError): | ||
pass | ||
|
||
|
||
class TileSourceAssetstoreException(TileSourceException): | ||
class TileSourceAssetstoreError(TileSourceError): | ||
pass | ||
|
||
|
||
class TileSourceFileNotFoundError(TileSourceError, FileNotFoundError): | ||
def __init__(self, *args, **kwargs): | ||
return super().__init__(errno.ENOENT, *args, **kwargs) | ||
|
||
|
||
TileGeneralException = TileGeneralError | ||
TileSourceException = TileSourceError | ||
TileSourceAssetstoreException = TileSourceAssetstoreError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.