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

Give warning for missing pool and continue #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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