[gedit-latex] Prevent a crash when no job command is present



commit 67ae860a3a7be117f9bbd227de099c10f107bd4c
Author: Sven (Sbte) <svenb linux gmail com>
Date:   Sat Jul 14 21:33:17 2012 +0200

    Prevent a crash when no job command is present

 latex/preferences/tools.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/latex/preferences/tools.py b/latex/preferences/tools.py
index 4c583f6..62357ab 100644
--- a/latex/preferences/tools.py
+++ b/latex/preferences/tools.py
@@ -87,7 +87,8 @@ class ToolPreferences(GObject.GObject):
         for tool_element in self.__tools.findall("tool"):
             jobs = []
             for job_element in tool_element.findall("job"):
-                jobs.append(Job(job_element.text.strip(), str_to_bool(job_element.get("mustSucceed")), self.POST_PROCESSORS[job_element.get("postProcessor")]))
+                command = '' if job_element.text is None else job_element.text.strip()
+                jobs.append(Job(command, str_to_bool(job_element.get("mustSucceed")), self.POST_PROCESSORS[job_element.get("postProcessor")]))
 
             assert not tool_element.get("extensions") is None
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]