Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Commit

Permalink
Give warning for missing pool and continue
Browse files Browse the repository at this point in the history
  • Loading branch information
morevnaproject committed Aug 26, 2014
1 parent 454f911 commit 3a04903
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Puli/src/octopus/dispatcher/db/pulidb.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,11 +798,14 @@ def restoreStateFromDb(self, tree, rnsAlreadyLoaded):
for num, dbPoolShare in enumerate(poolShares):
id, poolId, nodeId, maxRN, archived = dbPoolShare
#FIXME temp
if nodeId in nodesById.keys():
realPoolShare = PoolShare(id,
poolsById[poolId],
nodesById[nodeId],
maxRN)
if not poolId in poolsById.keys():
print "%s !!! Warning: PoolShare %d references nonexisting pool ID (%d)" % (time.strftime('[%H:%M:%S]', time.gmtime(time.time() - begintime)),id,poolId)
else:
if nodeId in nodesById.keys():
realPoolShare = PoolShare(id,
poolsById[poolId],
nodesById[nodeId],
maxRN)
tree.poolShares[realPoolShare.id] = realPoolShare

print "%s -- poolshares complete --" % (time.strftime('[%H:%M:%S]', time.gmtime(time.time() - begintime)))
Expand Down

0 comments on commit 3a04903

Please sign in to comment.