Checking that petname exists

This commit is contained in:
bashrc committed 2020-11-23 14:26:20 +00:00
1 parent 901d9c66c5
commit 44eacde556
1 file changed
+1 -1
+1 -1
View File
@@ -29,7 +29,7 @@ def setPetName(baseDir: str, nickname: str, domain: str,
if os.path.isfile(petnamesFilename):
with open(petnamesFilename, 'r') as petnamesFile:
petnamesStr = petnamesFile.read()
if entry in petnamesStr:
if petnamesStr.startswith(petname + ' '):
return True
if ' ' + handle + '\n' in petnamesStr:
petnamesList = petnamesStr.split('\n')