2
0
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:
Jarrod Johnson 2020-05-08 14:43:54 -04:00
parent ee2f80b5d2
commit 807c68890d

View File

@ -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 = []