Avoid confusing variable name

main
Bob Mottram 2020-09-03 11:12:11 +01:00
parent b54c9e52f7
commit 8d642fe267
1 changed files with 6 additions and 6 deletions

View File

@ -365,10 +365,10 @@ def followPerson(baseDir: str, nickname: str, domain: str,
return True return True
# prepend to follow file # prepend to follow file
try: try:
with open(filename, 'r+') as followFile: with open(filename, 'r+') as f:
content = followFile.read() content = f.read()
followFile.seek(0, 0) f.seek(0, 0)
followFile.write(handleToFollow + '\n' + content) f.write(handleToFollow + '\n' + content)
if debug: if debug:
print('DEBUG: follow added') print('DEBUG: follow added')
except Exception as e: except Exception as e:
@ -379,8 +379,8 @@ def followPerson(baseDir: str, nickname: str, domain: str,
if debug: if debug:
print('DEBUG: creating new following file to follow ' + print('DEBUG: creating new following file to follow ' +
handleToFollow) handleToFollow)
with open(filename, 'w+') as followfile: with open(filename, 'w+') as f:
followfile.write(handleToFollow + '\n') f.write(handleToFollow + '\n')
# Default to adding new follows to the calendar. # Default to adding new follows to the calendar.
# Possibly this could be made optional # Possibly this could be made optional