Skip to content

Commit 4453b2c

Browse files
rv2931herve.le-bars
authored and
herve.le-bars
committed
fix: ruff exception Trawlwatcher.py on exception
Trawlwatcher.py:15:11: TRY003 Avoid specifying long messages outside the exception class
1 parent 759021f commit 4453b2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bloom/Trawlwatcher.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@
1010
layout="wide",
1111
)
1212

13+
class EnvFileNotFoundError(FileNotFoundError):
14+
def __init__(self, env_path:str) -> None:
15+
super().__init__(f"Couldn't find .env file at {env_path}")
16+
1317
# FILL IN YOUR CREDENTIALS .env file HERE !!
14-
env_path = Path('.') / '.env.template'
18+
env_path = Path('.') / '.env.template2'
1519
if not env_path.is_file():
16-
raise FileNotFoundError(f"Couldn't find .env file at {env_path.absolute()}")
20+
raise EnvFileNotFoundError(env_path.absolute())
1721
load_dotenv(env_path)
1822

1923
def local_css(file_name: str) -> None:

0 commit comments

Comments
 (0)