Skip to content

Commit

Permalink
wx.metadata/r.info.iso: fix flake8-strict errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Jul 2, 2020
1 parent 6a001d2 commit 8d05182
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions grass7/gui/wxpython/wx.metadata/r.info.iso/r.info.iso.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8
# -*- coding: utf-8 -*-

"""
@module r.info.iso
@brief Module for creating metadata based on ISO for raster maps
Expand Down Expand Up @@ -33,17 +34,17 @@
#% required: no
#%end


import os
import sys

from grass.script import parser, fatal
from grass.pygrass.utils import set_path
from grass.script import parser
from grass.script.utils import set_path

set_path(modulename='wx.metadata', dirname='mdlib')


def main():
# load metadata library
# Load metadata library
from mdlib.mdgrass import GrassMD

if not options['output']:
Expand All @@ -55,19 +56,23 @@ def main():
md = GrassMD(options['map'], 'raster')
if options['profile'] == 'inspire':
md.createGrassInspireISO()
xml_file = md.saveXML(path=destination,
xml_out_name=name,
overwrite=os.getenv('GRASS_OVERWRITE', False))
xml_file = md.saveXML(
path=destination,
xml_out_name=name,
overwrite=os.getenv('GRASS_OVERWRITE', False),
)

if xml_file is not False:
md.readXML(xml_file)
print(md.validate_inspire())

else:
md.createGrassBasicISO()
xml_file = md.saveXML(path=destination,
xml_out_name=name,
overwrite=os.getenv('GRASS_OVERWRITE', False))
xml_file = md.saveXML(
path=destination,
xml_out_name=name,
overwrite=os.getenv('GRASS_OVERWRITE', False),
)

if xml_file is not False:
md.readXML(xml_file)
Expand All @@ -76,5 +81,4 @@ def main():

if __name__ == "__main__":
options, flags = parser()
main()

sys.exit(main())

0 comments on commit 8d05182

Please sign in to comment.