Skip to content

Commit 17b79fc

Browse files
committed
rename a function to match what it actually does
1 parent f1fca0f commit 17b79fc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

github_backup/github_backup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def get_auth(args, encode=True, for_git_cli=False):
545545
)
546546
elif args.token_fine:
547547
if args.token_fine.startswith(FILE_URI_PREFIX):
548-
args.token_fine = read_file_contents(args.token_fine)
548+
args.token_fine = read_first_line(args.token_fine)
549549

550550
if args.token_fine.startswith("github_pat_"):
551551
auth = args.token_fine
@@ -561,7 +561,7 @@ def get_auth(args, encode=True, for_git_cli=False):
561561
)
562562
args.token_classic = read_token_from_gh_cli(args)
563563
elif args.token_classic.startswith(FILE_URI_PREFIX):
564-
args.token_classic = read_file_contents(args.token_classic)
564+
args.token_classic = read_first_line(args.token_classic)
565565

566566
if not args.as_app:
567567
auth = args.token_classic + ":" + "x-oauth-basic"
@@ -623,7 +623,7 @@ def get_github_host(args):
623623
return host
624624

625625

626-
def read_file_contents(file_uri):
626+
def read_first_line(file_uri):
627627
with open(file_uri[len(FILE_URI_PREFIX) :], "rt") as f:
628628
return f.readline().strip()
629629

0 commit comments

Comments
 (0)