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
import errno
import os
import sys
@ -61,7 +62,7 @@ def main():
try:
os.mkdir(bug_folder_name)
except OSError, error:
if error.errno == 17:
if error.errno == errno.EEXIST:
continue
for attachment in bug.attachments: