Skip to content

Commit e1ee7a6

Browse files
authored
Merge pull request #2210 from lonvia/errorcode-on-exception
Make osm2pgsql-replication return a non-null error code on exception
2 parents f0433c2 + 41b069e commit e1ee7a6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/osm2pgsql-replication

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,4 +721,10 @@ def main(prog_args=None):
721721

722722

723723
if __name__ == '__main__':
724-
sys.exit(main())
724+
try:
725+
retcode = main()
726+
except Exception as ex:
727+
LOG.fatal("Exception during execution: %s", ex)
728+
retcode = 3
729+
730+
sys.exit(retcode)

0 commit comments

Comments
 (0)