Browse Source

remove a few debug statements..

comment a bit better...

[git-p4: depot-paths = "//depot/": change = 769]
replace/4e84fdb41ea781c7a8f872baa423e8b3be4045a7
John-Mark Gurney 19 years ago
parent
commit
a21cb93726
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      FSStorage.py

+ 2
- 6
FSStorage.py View File

@@ -35,7 +35,7 @@ class FSObject(object):
self.pstat = nstat self.pstat = nstat
self.doUpdate() self.doUpdate()
except OSError, x: except OSError, x:
log.msg('OSError: %s' % x)
log.msg('os.stat, OSError: %s' % x)
if x.errno in (errno.ENOENT, errno.ENOTDIR, errno.EPERM, ): if x.errno in (errno.ENOENT, errno.ENOTDIR, errno.EPERM, ):
# We can't access it anymore, delete it # We can't access it anymore, delete it
self.cd.delItem(self.id) self.cd.delItem(self.id)
@@ -120,14 +120,12 @@ class FSDirectory(FSObject, StorageFolder):
def doUpdate(self): def doUpdate(self):
# We need to rescan this dir, and see if our children has # We need to rescan this dir, and see if our children has
# changed any. # changed any.
log.msg('doUpdate: %s, path: %s' % (self.title, self.FSpath))
children = sets.Set(os.listdir(self.FSpath)) children = sets.Set(os.listdir(self.FSpath))
for i in self.pathObjmap: for i in self.pathObjmap:
if i not in children: if i not in children:
# delete # delete
self.cd.delItem(self.pathObjmap[i]) self.cd.delItem(self.pathObjmap[i])


log.msg('doUpdate: %s, children: %s' % (self.title, children))
for i in children: for i in children:
fname = os.path.join(self.FSpath, i) fname = os.path.join(self.FSpath, i)
if i in self.pathObjmap: if i in self.pathObjmap:
@@ -146,11 +144,9 @@ class FSDirectory(FSObject, StorageFolder):


if nf is not None: if nf is not None:
self.pathObjmap[i] = nf self.pathObjmap[i] = nf
log.msg('i: %s, nf: %s' % (i, nf))


# sort our children # sort our children
log.msg('doUpdate: %s, sorting: %s' % (self.title, list.__str__(self)))
self.sort(lambda x, y: cmp(x.title, y.title)) self.sort(lambda x, y: cmp(x.title, y.title))
log.msg('sorted')


# Pass up to handle UpdateID
StorageFolder.doUpdate(self) StorageFolder.doUpdate(self)

Loading…
Cancel
Save