diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-14 23:37:06 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-14 23:37:06 +0200 |
commit | 2ce4b4e99cd139ff1ce2976c317218beaa5a16c6 (patch) | |
tree | fcadb744c21cd314dc8ac2d5d2e4d3a3ed541119 | |
parent | 43d3e73661ae265d0af314303310ed4dcb1ce780 (diff) | |
download | pyParrotZikTCP-2ce4b4e99cd139ff1ce2976c317218beaa5a16c6.tar.xz pyParrotZikTCP-2ce4b4e99cd139ff1ce2976c317218beaa5a16c6.zip |
Refactor.
-rw-r--r-- | resource_manager.py | 4 |
1 files changed, 3 insertions, 1 deletions
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": |