[ADMIN] Python os.system module handle errors
Hi all, When I create a database dump in python script and if there are some errors (user_name is not correct, db_name doesn't exist or something else) I need to send e-mail notification to admin. How can I handle these errors? Example: --
[ADMIN] handling errors of os.error module
-mail if there is an error of backing up # ... print "Backup error %s" % error -- Sincerely, Vadim Pestovnikov ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq