forked from indymedia/epicyon
Warn if account does not exist
parent
ca5c0d5f20
commit
cf3899b58f
6
utils.py
6
utils.py
|
@ -236,6 +236,10 @@ def followPerson(baseDir: str,nickname: str, domain: str, \
|
|||
else:
|
||||
handle=nickname+'@'+domain.lower()
|
||||
|
||||
if not os.path.isdir(baseDir+'/accounts/'+handle):
|
||||
print('WARN: account for '+handle+' does not exist')
|
||||
return False
|
||||
|
||||
if ':' in followDomain:
|
||||
handleToFollow=followNickname+'@'+followDomain.split(':')[0]
|
||||
else:
|
||||
|
@ -257,8 +261,6 @@ def followPerson(baseDir: str,nickname: str, domain: str, \
|
|||
|
||||
if not os.path.isdir(baseDir+'/accounts'):
|
||||
os.mkdir(baseDir+'/accounts')
|
||||
if not os.path.isdir(baseDir+'/accounts/'+handle):
|
||||
os.mkdir(baseDir+'/accounts/'+handle)
|
||||
handleToFollow=followNickname+'@'+followDomain
|
||||
filename=baseDir+'/accounts/'+handle+'/'+followFile
|
||||
if os.path.isfile(filename):
|
||||
|
|
Loading…
Reference in New Issue