Skip to content

Commit 3bffac2

Browse files
author
Max Noel
committed
Using errno.EEXIST rather than a literal 17 -- more compatibility.
1 parent 528efab commit 3bffac2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/dynamodb_dump

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22

33
import argparse
4+
import errno
45
import os
56

67
import boto
@@ -52,8 +53,8 @@ def dynamodb_dump(tables, out_dir):
5253
try:
5354
os.makedirs(out_dir)
5455
except OSError as e:
55-
# Error 17 is "file exists", which we don't care about
56-
if e.errno != 17:
56+
# We don't care if the dir already exists.
57+
if e.errno != errno.EEXIST:
5758
raise
5859

5960
conn = boto.connect_dynamodb()

0 commit comments

Comments
 (0)