mirror of
https://gitlab.com/bashrc2/epicyon
synced 2026-11-02 18:59:53 +00:00
Warn if account does not exist
This commit is contained in:
1 parent
ca5c0d5f20
commit
cf3899b58f
1 file changed
+4
-2
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user