Skip to content

Commit

Permalink
Change Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis TARUSSIO committed Oct 28, 2020
1 parent f78e89a commit 2f0462b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions A3modmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
import fileinput
from bs4 import BeautifulSoup
import configparser
from pathlib import Path

CONFIG_FILE = "lgsm/config-lgsm/arma3server/arma3mods.cfg"

if not CONFIG_FILE.is_file():
print(CONFIG_FILE + " Does not exist check your file location")

if not Path("lgsm/config-lgsm/arma3server/arma3mods.cfg").is_file():
print("lgsm/config-lgsm/arma3server/arma3mods.cfg Does not exist check your file location")
exit(1)

configParser = configparser.RawConfigParser()
Expand All @@ -41,17 +42,17 @@



if not uploadFolder.is_dir():
if not Path(uploadFolder).is_dir():
print(uploadFolder + " Does not exist you must create the folder.")
exit(1)

# Search for preset html file
for f_name in os.listdir(uploadFolder):
if f_name.endswith('.html'):
PRESET_FILE= uploadFolder + f_name
if not PRESET_FILE.is_dir():
print(PRESET_FILE + " Does not exist, PRESET_FILE must be a html\'s file ")
exit(1)
if not Path(PRESET_FILE).is_file():
print(PRESET_FILE + " Does not exist, PRESET_FILE must be a html\'s file ")
exit(1)

with open(PRESET_FILE) as pf:
soup = BeautifulSoup(pf, 'html.parser')
Expand Down

0 comments on commit 2f0462b

Please sign in to comment.