diff web/watch.py @ 191:8318d50d766d

gets current params
author Matt Johnston <matt@ucc.asn.au>
date Tue, 11 Feb 2014 22:10:32 +0800
parents 101c66da848d
children 9c2de3f977e4
line wrap: on
line diff
--- a/web/watch.py	Sun Feb 09 11:41:13 2014 +0800
+++ b/web/watch.py	Tue Feb 11 22:10:32 2014 +0800
@@ -27,8 +27,6 @@
 		pattern = os.path.basename(g)
 		dirpatterns.setdefault(d, []).append(pattern)
 
-	print(dirpatterns)
-
 	watchpatterns = {}
 	for d, patterns in dirpatterns.items():
 
@@ -46,12 +44,10 @@
 		if event.name is None:
 			return
 
-		print("%s %s " % (event.name, event.maskname))
 		patterns = watchpatterns[event.wd]
 		for p in patterns:
-			print(p)
 			if fnmatch.fnmatch(event.name, p):
-				print("matched %s" % p)
+				print("matched %s %s" % (event.name, p, event.maskname))
 				os.utime(touchf, None)
 
 	n = pyinotify.Notifier(watcher, triggered)