forked from indymedia/epicyon
flake8 format
parent
295814cd9b
commit
08a1b05a76
|
@ -8,7 +8,9 @@ __status__="Production"
|
|||
|
||||
import os
|
||||
|
||||
def migrateFollows(followFilename: str,oldHandle: str,newHandle: str) -> None:
|
||||
|
||||
def migrateFollows(followFilename: str, oldHandle: str,
|
||||
newHandle: str) -> None:
|
||||
"""Changes a handle within following or followers list
|
||||
"""
|
||||
if not os.path.isfile(followFilename):
|
||||
|
@ -26,6 +28,7 @@ def migrateFollows(followFilename: str,oldHandle: str,newHandle: str) -> None:
|
|||
with open(followFilename, 'w') as followFile:
|
||||
followFile.write(newFollowData)
|
||||
|
||||
|
||||
def migrateAccount(baseDir: str, oldHandle: str, newHandle: str) -> None:
|
||||
"""If a followed account changes then this modifies the
|
||||
following and followers lists for each account accordingly
|
||||
|
@ -35,7 +38,7 @@ def migrateAccount(baseDir: str,oldHandle: str,newHandle: str) -> None:
|
|||
if '@' not in oldHandle:
|
||||
return
|
||||
if newHandle.startswith('@'):
|
||||
ewHandle=newHandle[1:]
|
||||
newHandle = newHandle[1:]
|
||||
if '@' not in newHandle:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue