aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFulgen301 <tokmajigeorge@gmail.com>2017-11-26 11:07:30 +0100
committerFulgen301 <tokmajigeorge@gmail.com>2017-11-26 11:07:30 +0100
commitef07c3d832bcb380ced61432b8b570668a6ec9c8 (patch)
treea0dd5a71eff805fc6cd6439cd9d71efee7bbbe5a
parentabdde9e4ef6c3c64e0d7f838423ca0cc001dc8d8 (diff)
downloadpycrctrl-ef07c3d832bcb380ced61432b8b570668a6ec9c8.tar.gz
pycrctrl-ef07c3d832bcb380ced61432b8b570668a6ec9c8.zip
Fix scenario hosting
-rwxr-xr-xpycrctrl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pycrctrl.py b/pycrctrl.py
index 0c2017d..2a7ea89 100755
--- a/pycrctrl.py
+++ b/pycrctrl.py
@@ -213,10 +213,10 @@ class PyCRCtrl(object):
raise OSError("No path specified")
with open(os.path.join(self.path,"scenarios.lst"), "r") as fobj:
- self.scenlist = fobj.readlines()
+ self.scenlist = [i.strip() for i in fobj.readlines()]
with open(os.path.join(self.path, "scenarios_league.lst"), "r") as fobj:
- self.league_scenlist = fobj.readlines()
+ self.league_scenlist = [i.strip() for i in fobj.readlines()]
print("DEBUG: Scenario lists loaded.")
@@ -546,6 +546,7 @@ def host(args):
elif scenario not in server.scenlist:
reply(f"Szenario {scenario} nicht gefunden!")
+ return
if not server.server_thread:
server.scenario = scenario