[gedit-latex] resources: create user dir if it doesn't exists
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex] resources: create user dir if it doesn't exists
- Date: Wed, 29 Jun 2011 13:52:25 +0000 (UTC)
commit 1c5ec425a68aaa3990183b8451d34bd266a520e4
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Wed Jun 29 15:52:19 2011 +0200
resources: create user dir if it doesn't exists
latex/base/resources.py | 7 +++++++
latex/latex/model.py | 4 ----
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/latex/base/resources.py b/latex/base/resources.py
index fbf4eb2..c2c9528 100644
--- a/latex/base/resources.py
+++ b/latex/base/resources.py
@@ -47,6 +47,13 @@ class Resources(Singleton):
self.userdir = userdir
self.systemdir = systemdir
+ # Make sure dir exists
+ try:
+ os.makedirs(userdir)
+ except OSError, e:
+ if e.errno != errno.EEXIST:
+ raise
+
def get_user_dir(self):
return self.userdir
diff --git a/latex/latex/model.py b/latex/latex/model.py
index 77f3a0c..72762fe 100644
--- a/latex/latex/model.py
+++ b/latex/latex/model.py
@@ -303,8 +303,4 @@ class LanguageModelFactory(object):
"""
return deepcopy(self.__language_model)
-
-
-
-
# ex:ts=4:et:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]