cc-4105: Extended api of SyncDB and improved the launcher script

This commit is contained in:
root 2012-07-20 17:13:00 -04:00 committed by Rudi Grinberg
parent 6a7cb50d67
commit 587292c963
4 changed files with 53 additions and 11 deletions

View file

@ -44,6 +44,11 @@ class IncludeOnly(object):
if ext in self.exts: func(moi, event, *args, **kwargs)
return _wrap
def partition(f, alist):
# TODO : document this function and add doctests
return (filter(f, alist), filter(lambda x: not f(x), alist))
def is_file_supported(path):
# TODO : test and document this function
return extension(path) in supported_extensions