aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-14 23:37:06 +0200
committerMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-14 23:37:06 +0200
commit2ce4b4e99cd139ff1ce2976c317218beaa5a16c6 (patch)
treefcadb744c21cd314dc8ac2d5d2e4d3a3ed541119
parent43d3e73661ae265d0af314303310ed4dcb1ce780 (diff)
downloadpyParrotZikTCP-2ce4b4e99cd139ff1ce2976c317218beaa5a16c6.tar.xz
pyParrotZikTCP-2ce4b4e99cd139ff1ce2976c317218beaa5a16c6.zip
Refactor.
-rw-r--r--resource_manager.py4
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":