Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion simplekml/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __str__(self):
val = Kmlable._chrconvert(val)
elif (var == 'href' and os.path.exists(val) and outputkmz == True)\
or (var == 'targetHref' and os.path.exists(val) and outputkmz == True): # Check for images
Kmlable._currentroot._foundimages.append(val)
Kmlable._currentroot._foundimages.add(val)
val = os.path.join('files', os.path.split(val)[1]).replace('\\', '/')
val = Kmlable._chrconvert(val)
elif (var in ['href', 'targetHref']):
Expand Down
6 changes: 3 additions & 3 deletions simplekml/kml.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def __init__(self, **kwargs):
self._hint = None
self._parsetext = True
self._outputkmz = False
self._images = []
self._foundimages = []
self._images = set()
self._foundimages = set()
self._namespaces = ['xmlns="http://www.opengis.net/kml/2.2"', 'xmlns:gx="http://www.google.com/kml/ext/2.2"']
self._processedstyles = []

Expand Down Expand Up @@ -87,7 +87,7 @@ def addfile(self, path):

*New in version 1.2.0*
"""
self._images.append(path)
self._images.add(path)
return os.path.join('files', os.path.split(path)[1]).replace("\\", "/")

@property
Expand Down