Skip to content

Commit b86d161

Browse files
committed
rm FileHandler params
1 parent 8c14af1 commit b86d161

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

getORCIDToken.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
stream_handler.setLevel(logging.INFO)
1010

1111
logfile_format = logging.Formatter('%(asctime)s: %(name)s (%(funcName)s): %(message)s')
12-
logfile = logging.FileHandler( filename='getORCIDtoken.log',
13-
mode='a',
14-
encoding=None,
15-
delay=False )
12+
logfile = logging.FileHandler(filename='getORCIDtoken.log')
1613
logfile.setFormatter(logfile_format)
1714
logfile.setLevel(logging.DEBUG)
1815

@@ -66,7 +63,7 @@ def writeToken(token, testing):
6663
with open(".env", "a") as file:
6764
if testing == True:
6865
file.write("\n# Sandbox token\n")
69-
token_env = ('PUBLIC_ACCESS_TOKEN = \"{0}\"'.format(token))
66+
token_env = ('\nPUBLIC_ACCESS_TOKEN = \"{0}\"'.format(token))
7067
file.write(token_env)
7168
log.info("Added token to .env file.")
7269
file.close

0 commit comments

Comments
 (0)