ajout de verification de existence fichier
This commit is contained in:
parent
ba511bc6c4
commit
5768b37cd1
@ -15,6 +15,7 @@ class WPimport:
|
|||||||
|
|
||||||
def fromFile(self, files):
|
def fromFile(self, files):
|
||||||
for file in files.split(","):
|
for file in files.split(","):
|
||||||
|
if os.path.exists(file):
|
||||||
with open(file, 'r') as f:
|
with open(file, 'r') as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
soup = BeautifulSoup(content, 'html.parser')
|
soup = BeautifulSoup(content, 'html.parser')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user