We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fb6519 commit 7cd9d52Copy full SHA for 7cd9d52
test_all_tools.py
@@ -25,10 +25,15 @@ def load_env():
25
with open(env_path, 'r') as f:
26
for line in f:
27
line = line.strip()
28
- if line and not line.startswith('#') and '=' in line:
29
- key, value = line.split('=', 1)
30
- os.environ[key] = value
31
- else:
+ if not line or line.startswith('#'):
+ continue
+ if line.startswith('export '):
+ line = line[7:].strip()
32
+ if '=' not in line:
33
34
+ key, value = line.split('=', 1)
35
+ value = value.strip().strip('"').strip("'")
36
+ os.environ[key] = value
37
print("⚠️ .env file not found. Please copy .env.example to .env and add your API key.")
38
print(" Get your API key from: https://etherscan.io/apis")
39
return False
0 commit comments