summaryrefslogtreecommitdiffstats
path: root/pychathans
diff options
context:
space:
mode:
authorRajeesh K Nambiar <rajeeshknambiar@gmail.com>2009-01-11 00:10:17 +0530
committerRajeesh K Nambiar <rajeeshknambiar@gmail.com>2009-01-11 00:10:17 +0530
commitfc27d30e268936baaac72ef2e58a7f1292333723 (patch)
tree1bbec34e330b4d40841224c082adf188de7122b4 /pychathans
parent76c74b5531dc0d0974460ba09c1d9cb6a132525e (diff)
downloadRachana.git-fc27d30e268936baaac72ef2e58a7f1292333723.tar.gz
Rachana.git-fc27d30e268936baaac72ef2e58a7f1292333723.tar.xz
Rachana.git-fc27d30e268936baaac72ef2e58a7f1292333723.zip
Accept return values from Payyans and display error messages
Diffstat (limited to 'pychathans')
-rw-r--r--pychathans/chathans.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pychathans/chathans.py b/pychathans/chathans.py
index eab4c8d..4738fe7 100644
--- a/pychathans/chathans.py
+++ b/pychathans/chathans.py
@@ -147,9 +147,15 @@ class Chathans (gtk.Window):
# ഓഹ്, പയ്യന്‍! നീ വ്യാഘ്രമാകുന്നു.
payyan = Payyans(self.AsciiFile, self.UnicodeFile, self.MappingFile)
- payyan.ascii2unicode()
+ status = payyan.ascii2unicode()
+ print status
+ if status == None:
+ msg = "Coversion Done - Unicode file :" + self.UnicodeFile
+ if status == 1:
+ msg = "Could not find the pdftotext utility. Exiting..."
+ if status == 2:
+ msg = "Syntax Error in Mapping file. Exiting..."
# കത്തിച്ചു കഴിഞ്ഞു.
- msg = "Coversion Done - Unicode file :" + self.UnicodeFile
dlg = gtk.MessageDialog(self.get_toplevel(),
gtk.DIALOG_MODAL,
gtk.MESSAGE_INFO,