Commit 740d0c0f authored by heltonbiker's avatar heltonbiker

Corrected some QuantifiedCode issues

parent 6c45b50a
#!/usr/bin/env python #!/usr/bin/env python
# coding: utf-8 # coding: utf-8
from fastkml.kml import * from fastkml import kml
def printChildFeatures(element): def print_child_features(element):
level = 0 if not getattr(element, 'features', None):
return
for feature in element.features(): for feature in element.features():
try: print feature.name
print " " * level, feature.name print_child_features(feature)
printChildFeatures(feature)
level += 1
except:
pass
if __name__ == '__main__': if __name__ == '__main__':
fname = "KML_Samples.kml" fname = "KML_Samples.kml"
k = KML() k = kml.KML()
with open(fname) as kmlFile: with open(fname) as kmlFile:
k.from_string(kmlFile.read()) k.from_string(kmlFile.read())
printChildFeatures(k) print_child_features(k)
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment