There was an error while loading. Please reload this page.
1 parent 12870ca commit 77e5e6cCopy full SHA for 77e5e6c
1 file changed
dotenv.py
@@ -12,12 +12,15 @@ def read_dotenv(dotenv=None):
12
if dotenv is None:
13
frame = sys._getframe()
14
dotenv = os.path.join(os.path.dirname(frame.f_back.f_code.co_filename), '.env')
15
- if not os.path.exists(dotenv):
16
- warnings.warn("not reading %s - it doesn't exist." % dotenv)
17
- return
+ if not os.path.exists(dotenv):
+ warnings.warn("not reading %s - it doesn't exist." % dotenv)
+ return
18
for k, v in parse_dotenv(dotenv):
19
os.environ.setdefault(k, v)
20
21
+def write_dotenv(dotenv=None):
22
+
23
24
def parse_dotenv(dotenv):
25
for line in open(dotenv):
26
line = line.strip()
0 commit comments