Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Using errno.EEXIST rather than a literal 17 -- more compatibility.

  • Loading branch information...
commit 3bffac22a4b8ac00a8462371ed43b1ceb4aee59c 1 parent 528efab
Max Noel authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 bin/dynamodb_dump
5 bin/dynamodb_dump
... ... @@ -1,6 +1,7 @@
1 1 #!/usr/bin/env python
2 2
3 3 import argparse
  4 +import errno
4 5 import os
5 6
6 7 import boto
@@ -52,8 +53,8 @@ def dynamodb_dump(tables, out_dir):
52 53 try:
53 54 os.makedirs(out_dir)
54 55 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:
57 58 raise
58 59
59 60 conn = boto.connect_dynamodb()

0 comments on commit 3bffac2

Please sign in to comment.
Something went wrong with that request. Please try again.