From 2ce4b4e99cd139ff1ce2976c317218beaa5a16c6 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Sun, 14 Jun 2015 23:37:06 +0200 Subject: Refactor. --- resource_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resource_manager.py b/resource_manager.py index 695314b..8aa4fb8 100644 --- a/resource_manager.py +++ b/resource_manager.py @@ -63,8 +63,10 @@ class ResourceManagerBase(object): return data.answer def handle_notification(self, notification): + self.fetch(self._clean_path(notification['path'])) - self.fetch(notification['path'].rsplit('/', 1)[0].encode('utf-8')) + def _clean_path(self, path): + return path.rsplit('/', 1)[0].encode('utf-8') def receive_message(self): if sys.platform == "darwin": -- cgit v1.2.1