ParletteSoftware / chodewars

Space exploration remake of tradewars
1 stars 0 forks source link

big bang fails on flat file database #25

Closed matthew-parlette closed 11 years ago

matthew-parlette commented 11 years ago

Executing Big Bang... Traceback (most recent call last): File "chodewars.py", line 180, in game.big_bang() File "/home/matt/src/chodewars/chodewars/game.py", line 69, in big_bang return self.db.big_bang() File "/home/matt/src/chodewars/chodewars/db.py", line 145, in big_bang os.remove(f) OSError: [Errno 2] No such file or directory: 'matt.player'

I think this can be resolved by changing:

for f in os.listdir(self.path):
  os.remove(f)

to

for f in os.listdir(self.path):
  os.remove(os.path.join(self.path,f))

But this will need to be tested.