Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/pathexist.py

21 lines
542 B
Python

import os
import re
from os.path import abspath
def pathexist(ss):
ss = re.sub('_','',ss)
d = abspath('./assests/Favicon/' + ss + '/')
if not os.path.exists(d):
os.mkdir(d)
else:
pass
ddd = abspath('./assests/Favicon/' + ss + '/Wiki.png')
if not os.path.exists(ddd):
return False
else:
return True
def pathexist2(ss):
ddd = abspath('./home/wdljt/oasisakari/bot/assests/usercard/' + ss + '.png')
if not os.path.exists(ddd):
return False
else:
return True