Added 3 explicit casts to devel server to make py v3.5 compatible

This commit is contained in:
osboxes.org 2020-01-08 14:36:04 -07:00
parent 2609f07369
commit d82bc6abcd
6 changed files with 141 additions and 4 deletions

View File

@ -423,7 +423,7 @@ class Category:
self.catmod = None
try:
self.catmod = loadmod('category', os.path.join(path, 'category.py'))
self.catmod = loadmod('category', str(os.path.join(str(path), 'category.py')))
except FileNotFoundError:
self.catmod = None
@ -433,7 +433,7 @@ class Category:
pointvals = self.catmod.pointvals()
else:
pointvals = []
for fpath in glob.glob(os.path.join(self.path, "[0-9]*")):
for fpath in glob.glob(str(os.path.join(str(self.path), "[0-9]*"))):
pn = os.path.basename(fpath)
points = int(pn)
pointvals.append(points)
@ -441,12 +441,12 @@ class Category:
def puzzle(self, points):
puzzle = Puzzle(self.seed, points)
path = os.path.join(self.path, str(points))
path = str(os.path.join(str(self.path), str(points)))
if self.catmod:
with pushd(self.path):
self.catmod.make(points, puzzle)
else:
with pushd(self.path):
with pushd(str(self.path)):
puzzle.read_directory(path)
return puzzle

34
productionLaunch.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
workingDirectory=$1
if [ -z "${workingDirectory}" ] || [ "$1" == "-clean" ]; then
workingDirectory=$PWD
fi
if [ "$1" == "-clean" ] || [ "$2" == "-clean" ]; then
echo "Cleaning"
rm -rf "$workingDirectory/compiled-puzzles"
rm -rf "$workingDirectory/mothballs"
rm -rf "$workingDirectory/state"
exit
fi
echo "Working in directory $workingDirectory"
bash $workingDirectory/build.sh
mkdir $workingDirectory/compiled-puzzles
FILES=$workingDirectory/example-puzzles/*
#for f in $FILES
#do
# $workingDirectory/devel/package-puzzles.py $workingDirectory/compiled-puzzles $f
#done
#mkdir $workingDirectory/mothballs
#cp $workingDirectory/compiled-puzzles/* $workingDirectory/mothballs
mkdir $workingDirectory/state
sudo docker run --rm -it -p 8080:8080 -v $workingDirectory/state:/state -v $workingDirectory/mothballs:/mothballs dirtbags/moth

1
state/initialized Normal file
View File

@ -0,0 +1 @@
Remove this file to reinitialize the contest

0
state/points.log Normal file
View File

101
state/teamids.txt Normal file
View File

@ -0,0 +1,101 @@
88p=8bqy
fjr88kjk
7netqwyp
wi2npenr
t7repm=n
e=hqr4ik
c2yfaexj
fm7jjdjp
kwcphbjp
hjf2k7bh
jqbaczbe
brrp7iy6
=hp3ndpn
fyi4dwbx
iimrdjnp
kchwjrc4
rabdwhwh
zyy78ct3
kpidmeid
jj6bxixm
mxmr6i42
ktn88xcw
bnbw3j2c
ww7iz=xm
4na63cdr
73hq=6r4
r=ja2mr=
38hy22qd
mtqczk==
jji=rkzd
8dy=wa8e
74r6xc=3
q3p6jj6d
kftapwim
=bmwc44n
bkzc6bzq
ntjdbxby
fi84tmnr
zjm4kt7y
h3qr33jh
mazk=tr4
=7qcec46
4dwrthxx
ctrj2n6n
7wrzbf6w
inxffqna
m4rd=nww
hkq6rn88
wfmcd6di
hh8m6i7r
jhxe6w22
abx7wmfh
zz=6k=h7
88ycirdr
znnm8x4=
ek4p888c
tf6i=6p=
ncd46a82
2kqnx7ci
aqny4b=h
2862zt2t
2mqzpy8c
kjzcdcid
h=zj38de
cwtnpxc8
knzfnrqc
dbnf6zdj
7q3qx2mx
itjhbxxr
e6dd87z3
a28p4eit
7h6xx2a7
rzwdjnyw
rd=wxhat
=whxbhyi
xyfmjqfy
cdymnizb
enkjpkax
yj83r84z
d4y7e4if
edhhkzbt
fzciwxt6
adxwbtbe
qn2rkn8c
7h6ypb6h
7pxfc43j
rt8x4fdd
jki3w2hd
tmqyjxj4
iib264pq
tf7inmeb
c4qyfhck
ayj66cmb
e7hfaxzk
qikr=37k
d6hm374w
8ty4f2dn
qpr7fz3n
28ax7c7q
nd7i=jde
jkfcq4bi

1
state/teams/fjr88kjk Normal file
View File

@ -0,0 +1 @@
testteam