[kupfer] plugin.templates: Fix mistake
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] plugin.templates: Fix mistake
- Date: Thu, 19 Nov 2009 10:45:16 +0000 (UTC)
commit 9f2d238f78c6232e5dc1e6fbe3676adddd31213e
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Thu Nov 19 11:42:18 2009 +0100
plugin.templates: Fix mistake
If glib's USER_DIRECTORY_TEMPLATE is defined, we don't initialize a
variable and throw an exception. This was a mistake when implementing
this (that I can't test myself). This fix completes the variable
renaming so that it should work.
Reported by Francesco Marella (part of LP 471462)
kupfer/plugin/templates.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/plugin/templates.py b/kupfer/plugin/templates.py
index 93878bd..41e1c4d 100644
--- a/kupfer/plugin/templates.py
+++ b/kupfer/plugin/templates.py
@@ -91,8 +91,8 @@ class TemplatesSource (Source, PicklingHelperMixin, FilesystemWatchMixin):
# Set up change callback
tmpl_dir = glib.get_user_special_dir(glib.USER_DIRECTORY_TEMPLATES)
if not tmpl_dir:
- tmpl_var = os.path.expanduser(DEFAULT_TMPL_DIR)
- self.tmpl_dir = tmpl_var
+ tmpl_dir = os.path.expanduser(DEFAULT_TMPL_DIR)
+ self.tmpl_dir = tmpl_dir
self.monitor_token = self.monitor_directories(self.tmpl_dir)
def get_items(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]