From: <cl...@us...> - 2003-03-15 22:54:07
|
Update of /cvsroot/todo-manager/todo-manager/i18n In directory sc8-pr-cvs1:/tmp/cvs-serv430 Modified Files: genmo.py Log Message: Imporved error reporting when creating the LC_MESSAGES directories Index: genmo.py =================================================================== RCS file: /cvsroot/todo-manager/todo-manager/i18n/genmo.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- genmo.py 1 Oct 2002 19:00:34 -0000 1.4 +++ genmo.py 15 Mar 2003 22:54:04 -0000 1.5 @@ -23,16 +23,21 @@ if s[1] == '.po': # Attempt to create the LC_MESSAGES dir - try: - os.makedirs(locale_path %s[0]) - except OSError: - pass + lpath = locale_path %s[0] + + if not os.path.isdir(lpath): + try: + os.makedirs(lpath) + except OSError: + print "Unable to create the output directory: %s.\nExiting..." %lpath + sys.exit(1) print "Compiling %s translation for module: %s." %(file, module) os.system(call %((locale_path %s[0]), module, module, s[0])) def main(): os.chdir(os.pardir) + print "Changing to directory: %s" %os.getcwd() # All of the files and directories in the 'po' directory list = os.listdir('po') |