Commit 740d0c0f authored by heltonbiker's avatar heltonbiker

Corrected some QuantifiedCode issues

parent 6c45b50a
#!/usr/bin/env python
# coding: utf-8
from fastkml.kml import *
from fastkml import kml
def printChildFeatures(element):
level = 0
def print_child_features(element):
if not getattr(element, 'features', None):
return
for feature in element.features():
try:
print " " * level, feature.name
printChildFeatures(feature)
level += 1
except:
pass
print feature.name
print_child_features(feature)
if __name__ == '__main__':
fname = "KML_Samples.kml"
k = KML()
k = kml.KML()
with open(fname) as kmlFile:
k.from_string(kmlFile.read())
printChildFeatures(k)
\ No newline at end of file
print_child_features(k)
\ 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