Skip to content

Commit d95d48b

Browse files
jacekszubertbchew
authored andcommitted
Fail if connection to dynamodb was not established (#29)
1 parent 2856072 commit d95d48b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dynamodump.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,12 @@ def do_restore(conn, sleep_interval, source_table, destination_table, write_capa
503503
sleep_interval = AWS_SLEEP_INTERVAL
504504

505505

506+
# don't proceed if connection is not established
507+
if not conn:
508+
logging.info('Unable to establish connection with dynamodb')
509+
sys.exit(1)
510+
511+
506512
# set prefix separator
507513
prefix_separator = DEFAULT_PREFIX_SEPARATOR
508514
if args.prefixSeparator is not None:

0 commit comments

Comments
 (0)