formatted docstrings. fixed decorator with functools
This commit is contained in:
parent
2e54fd64d3
commit
10a6a4d541
2 changed files with 11 additions and 13 deletions
|
@ -10,14 +10,12 @@ from os.path import dirname
|
|||
import os.path
|
||||
|
||||
class Organizer(ReportHandler,Loggable):
|
||||
"""
|
||||
Organizer is responsible to to listening to OrganizeListener events
|
||||
and committing the appropriate changes to the filesystem. It does
|
||||
not in any interact with WatchSyncer's even when the the WatchSyncer
|
||||
is a "storage directory". The "storage" directory picks up all of
|
||||
its events through pyinotify. (These events are fed to it through
|
||||
StoreWatchListener)
|
||||
"""
|
||||
""" Organizer is responsible to to listening to OrganizeListener
|
||||
events and committing the appropriate changes to the filesystem.
|
||||
It does not in any interact with WatchSyncer's even when the the
|
||||
WatchSyncer is a "storage directory". The "storage" directory picks
|
||||
up all of its events through pyinotify. (These events are fed to it
|
||||
through StoreWatchListener) """
|
||||
|
||||
# Commented out making this class a singleton because it's just a band aid
|
||||
# for the real issue. The real issue being making multiple Organizer
|
||||
|
@ -41,11 +39,9 @@ class Organizer(ReportHandler,Loggable):
|
|||
super(Organizer, self).__init__(signal=self.channel, weak=False)
|
||||
|
||||
def handle(self, sender, event):
|
||||
"""
|
||||
Intercept events where a new file has been added to the organize
|
||||
directory and place it in the correct path (starting with
|
||||
self.target_path)
|
||||
"""
|
||||
""" Intercept events where a new file has been added to the
|
||||
organize directory and place it in the correct path (starting
|
||||
with self.target_path) """
|
||||
# Only handle this event type
|
||||
assert isinstance(event, OrganizeFile), \
|
||||
"Organizer can only handle OrganizeFile events.Given '%s'" % event
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue