From 8d642fe267688ffea2c319f2fb64e595073a436d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 3 Sep 2020 11:12:11 +0100 Subject: [PATCH] Avoid confusing variable name --- utils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils.py b/utils.py index eae0e75f..c39b042f 100644 --- a/utils.py +++ b/utils.py @@ -365,10 +365,10 @@ def followPerson(baseDir: str, nickname: str, domain: str, return True # prepend to follow file try: - with open(filename, 'r+') as followFile: - content = followFile.read() - followFile.seek(0, 0) - followFile.write(handleToFollow + '\n' + content) + with open(filename, 'r+') as f: + content = f.read() + f.seek(0, 0) + f.write(handleToFollow + '\n' + content) if debug: print('DEBUG: follow added') except Exception as e: @@ -379,8 +379,8 @@ def followPerson(baseDir: str, nickname: str, domain: str, if debug: print('DEBUG: creating new following file to follow ' + handleToFollow) - with open(filename, 'w+') as followfile: - followfile.write(handleToFollow + '\n') + with open(filename, 'w+') as f: + f.write(handleToFollow + '\n') # Default to adding new follows to the calendar. # Possibly this could be made optional