mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-29 11:51:08 +00:00
use errno and errno.EEXIST
This commit is contained in:
parent
1d36de0fbb
commit
96381b0ff3
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user