diff options
author | Rajeesh K Nambiar <rajeeshknambiar@gmail.com> | 2009-01-10 23:39:44 +0530 |
---|---|---|
committer | Rajeesh K Nambiar <rajeeshknambiar@gmail.com> | 2009-01-10 23:39:44 +0530 |
commit | 148a8e0954e2873a4c2b68ea52ebf4fd8ef47e7f (patch) | |
tree | d7e46987700b6eb243c161f420fd662f62ccf31b /payyans/payyans/payyan.py | |
parent | ebc64dbecc9fa87fdcd8a8fe2b0b2bb8443039bc (diff) | |
download | AnjaliOldLipi.git-148a8e0954e2873a4c2b68ea52ebf4fd8ef47e7f.tar.gz AnjaliOldLipi.git-148a8e0954e2873a4c2b68ea52ebf4fd8ef47e7f.tar.xz AnjaliOldLipi.git-148a8e0954e2873a4c2b68ea52ebf4fd8ef47e7f.zip |
Make Payyan to return error codes instead of sys.exit
Diffstat (limited to 'payyans/payyans/payyan.py')
-rwxr-xr-x | payyans/payyans/payyan.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/payyans/payyans/payyan.py b/payyans/payyans/payyan.py index 5c97585..4124549 100755 --- a/payyans/payyans/payyan.py +++ b/payyans/payyans/payyan.py @@ -101,7 +101,7 @@ class Payyan: print "The input file is a PDF file. To convert this the pdftotext utility is required. " print "This feature is available only for GNU/Linux Operating system." '''ഊഹും. കൊന്നാലും ഇനി മുന്നോട്ടില്ല. മുന്നില് മറ്റവനാകുന്നു. ഏതു്? ''' - sys.exit(1) + return 1 # Error - no pdftotext ! else: self.input_filename = self.input_filename.split(".") [0]+ ".txt" if self.input_filename : @@ -198,7 +198,7 @@ class Payyan: print "Error: Syntax Error in the Ascii to Unicode Map in line number ", line_number print "Line: "+ text '''പരിപാടി നിര്ത്താം ''' - sys.exit(2) + return 2 # Error - Syntax error in Mapping file '''ഇടതന്''' lhs = line.split("=") [ 0 ] '''വലതന്''' |