--- a/schemadiff.py Fri Jan 25 17:44:49 2013 +0100
+++ b/schemadiff.py Fri Jan 25 18:04:17 2013 +0100
@@ -25,16 +25,19 @@
pgd = pgdiff.PgDiff(srcbrowser, dstbrowser)
- if self.args.schema:
- pgd.filter_schemas(include=self.args.schema)
+ try:
+ if self.args.schema:
+ pgd.filter_schemas(include=self.args.schema)
+
+ if self.args.table:
+ pgd.filter_tables(include=self.args.table)
- if self.args.table:
- pgd.filter_tables(include=self.args.table)
-
- if self.args.sql:
- pgd.print_patch()
- else:
- pgd.print_diff()
+ if self.args.sql:
+ pgd.print_patch()
+ else:
+ pgd.print_diff()
+ except pgdiff.PgDiffError as e:
+ print('PgDiff error:', str(e))
tool = SchemaDiffTool()