Fix exception in flagd.py:FlagServer.handle_close

This commit is contained in:
Neale Pickett 2009-10-08 10:31:28 -06:00
parent dd281b5706
commit 1ba4f341f6
3 changed files with 4 additions and 1 deletions

View File

@ -142,6 +142,8 @@ class FlagServer(asynchat.async_chat):
self.inbuf.append(data) self.inbuf.append(data)
def set_flag(self, team): def set_flag(self, team):
if not self.cat:
return
self.flag = team self.flag = team
self.submitter.set_flag(self.cat, team) self.submitter.set_flag(self.cat, team)
f = open(os.path.join(flags_dir, self.cat), 'w') f = open(os.path.join(flags_dir, self.cat), 'w')

View File

@ -18,4 +18,4 @@ target:
$(MAKE) -C daemons TARGET=$(TARGET) install $(MAKE) -C daemons TARGET=$(TARGET) install
clean: clean:
rm -rf target rm -rf target pwnables.tce

View File

@ -0,0 +1 @@
/var/lib/cat/flag