From 8d584d059ddb054a4d106ac957f6a73868ed3ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20Silkeb=C3=A6kken?= Date: Wed, 9 Jan 2013 16:09:50 +0100 Subject: [PATCH] Move segments.core packages out of subdirectories --- powerline/ext/terminal/{segments/core.py => segments.py} | 0 powerline/ext/terminal/segments/__init__.py | 0 powerline/ext/tmux/{segments/core.py => segments.py} | 0 powerline/ext/tmux/segments/__init__.py | 0 powerline/ext/vim/{segments/core.py => segments.py} | 0 powerline/ext/vim/segments/__init__.py | 0 powerline/segments.py | 2 +- 7 files changed, 1 insertion(+), 1 deletion(-) rename powerline/ext/terminal/{segments/core.py => segments.py} (100%) delete mode 100644 powerline/ext/terminal/segments/__init__.py rename powerline/ext/tmux/{segments/core.py => segments.py} (100%) delete mode 100644 powerline/ext/tmux/segments/__init__.py rename powerline/ext/vim/{segments/core.py => segments.py} (100%) delete mode 100644 powerline/ext/vim/segments/__init__.py diff --git a/powerline/ext/terminal/segments/core.py b/powerline/ext/terminal/segments.py similarity index 100% rename from powerline/ext/terminal/segments/core.py rename to powerline/ext/terminal/segments.py diff --git a/powerline/ext/terminal/segments/__init__.py b/powerline/ext/terminal/segments/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/powerline/ext/tmux/segments/core.py b/powerline/ext/tmux/segments.py similarity index 100% rename from powerline/ext/tmux/segments/core.py rename to powerline/ext/tmux/segments.py diff --git a/powerline/ext/tmux/segments/__init__.py b/powerline/ext/tmux/segments/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/powerline/ext/vim/segments/core.py b/powerline/ext/vim/segments.py similarity index 100% rename from powerline/ext/vim/segments/core.py rename to powerline/ext/vim/segments.py diff --git a/powerline/ext/vim/segments/__init__.py b/powerline/ext/vim/segments/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/powerline/segments.py b/powerline/segments.py index 750a564c..76d0d513 100644 --- a/powerline/segments.py +++ b/powerline/segments.py @@ -13,7 +13,7 @@ class Segments(object): def get_function(self, segment): oldpath = sys.path sys.path = self.path + sys.path - segment_module = str(segment.get('module', 'powerline.ext.{0}.segments.core'.format(self.ext))) + segment_module = str(segment.get('module', 'powerline.ext.{0}.segments'.format(self.ext))) try: return None, getattr(import_module(segment_module), segment['name']), '{0}.{1}'.format(segment_module, segment['name'])