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:
|
else:
|
||||||
handle=nickname+'@'+domain.lower()
|
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:
|
if ':' in followDomain:
|
||||||
handleToFollow=followNickname+'@'+followDomain.split(':')[0]
|
handleToFollow=followNickname+'@'+followDomain.split(':')[0]
|
||||||
else:
|
else:
|
||||||
|
@ -257,8 +261,6 @@ def followPerson(baseDir: str,nickname: str, domain: str, \
|
||||||
|
|
||||||
if not os.path.isdir(baseDir+'/accounts'):
|
if not os.path.isdir(baseDir+'/accounts'):
|
||||||
os.mkdir(baseDir+'/accounts')
|
os.mkdir(baseDir+'/accounts')
|
||||||
if not os.path.isdir(baseDir+'/accounts/'+handle):
|
|
||||||
os.mkdir(baseDir+'/accounts/'+handle)
|
|
||||||
handleToFollow=followNickname+'@'+followDomain
|
handleToFollow=followNickname+'@'+followDomain
|
||||||
filename=baseDir+'/accounts/'+handle+'/'+followFile
|
filename=baseDir+'/accounts/'+handle+'/'+followFile
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
|
|
Loading…
Reference in New Issue