mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 11:30:23 +00:00
Fix import error
Attempted to make the same directory twice.
This commit is contained in:
parent
ee2f80b5d2
commit
807c68890d
@ -335,11 +335,8 @@ class MediaImporter(object):
|
||||
if identity.get('subname', None):
|
||||
targpath += '/' + identity['subname']
|
||||
self.targpath = '/var/lib/confluent/distributions/' + targpath
|
||||
try:
|
||||
os.makedirs(self.targpath)
|
||||
except OSError as e:
|
||||
if e.errno != 17:
|
||||
raise
|
||||
if os.path.exists(self.targpath):
|
||||
raise Exception('{0} already exists'.format(self.targpath))
|
||||
self.filename = os.path.abspath(media)
|
||||
self.importer = eventlet.spawn(self.importmedia)
|
||||
self.profiles = []
|
||||
|
Loading…
Reference in New Issue
Block a user