use errno and errno.EEXIST

This commit is contained in:
Brian Murray 2011-04-19 14:55:27 -07:00
parent 1d36de0fbb
commit 96381b0ff3

View File

@ -20,6 +20,7 @@
# ################################################################## # ##################################################################
from optparse import OptionParser from optparse import OptionParser
import errno
import os import os
import sys import sys
@ -61,7 +62,7 @@ def main():
try: try:
os.mkdir(bug_folder_name) os.mkdir(bug_folder_name)
except OSError, error: except OSError, error:
if error.errno == 17: if error.errno == errno.EEXIST:
continue continue
for attachment in bug.attachments: for attachment in bug.attachments: