Author: dmeyer
Date: Fri Dec 15 20:00:24 2006
New Revision: 2245
Modified:
trunk/beacon/src/server/crawl.py
Log:
handle umount on shutdown
Modified: trunk/beacon/src/server/crawl.py
==============================================================================
--- trunk/beacon/src/server/crawl.py (original)
+++ trunk/beacon/src/server/crawl.py Fri Dec 15 20:00:24 2006
@@ -301,6 +301,16 @@
# DELETE
# ---------------------------------------------------------------------
+ # before we delete, maybe the filesystem was just umounted
+ if mask & INotify.UMOUNT:
+ # Oops, our filesystem was umounted. This should never happen
+ # since all removable drives which could be umounted are on
+ # a different media in beacon. It happens sometimes on system
+ # shutdown, so we just ignore this event for now.
+ if name + '/' in self.monitoring:
+ self.monitoring.remove(name + '/', recursive=True)
+ return True
+
# The file does not exist, we need to delete it in the database
if self.db.get_object(item._beacon_data['name'],
item._beacon_parent._beacon_id):
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog