OSDN Git Service

Initial start of the server failed beacause of empty players.yaml.
authorbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Mon, 26 Feb 2007 04:18:26 +0000 (04:18 +0000)
committerbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Mon, 26 Feb 2007 04:18:26 +0000 (04:18 +0000)
changelog
shogi-server

index 1739944..820cc3f 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,6 +1,9 @@
 2007-02-26  Daigo Moriwaki <daigo at debian dot org>
 
-       * [shogi-server] Failed to show usage. This issue has been fixed. 
+       * [shogi-server]
+         - Failed to show usage. This issue has been fixed. 
+         - Initial start of the server failed beacause of empty players.yaml.
+           This issues has been fixed.
 
 2007-02-18  Daigo Moriwaki <daigo at debian dot org>
 
index dc0fdcc..d01d8f5 100755 (executable)
@@ -128,6 +128,7 @@ class League
   def search(id)
     hash = nil
     @db.transaction do
+      break unless  @db["players"]
       @db["players"].each do |group, players|
         hash = players[id]
         break if hash
@@ -139,6 +140,7 @@ class League
   def rated_players
     players = []
     @db.transaction(true) do
+      break unless  @db["players"]
       @db["players"].each do |group, players_hash|
         players << players_hash.keys
       end