Skip to content

Commit

Permalink
file -> open
Browse files Browse the repository at this point in the history
`file` is not available in python 3, use `open`
  • Loading branch information
jachym committed Oct 10, 2019
1 parent 612576e commit 2def8b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grass7/vector/v.lidar.mcc/v.lidar.mcc.py
Expand Up @@ -98,7 +98,7 @@
gettext.install('grassmods', os.path.join(os.getenv("GISBASE"), 'locale'))

def cleanup():
nuldev = file(os.devnull, 'w')
nuldev = open(os.devnull, 'w')
grass.run_command('g.remove', flags='f', type='vector', name= '%s,%s,%s' % (temp_ng, temp_ncin, temp_ncout), quiet = True, stderr = nuldev)

def main():
Expand All @@ -109,7 +109,7 @@ def main():
# this would be done easily with StringIO
# but it doesn't work with subprocess
if not grass.debug_level():
nuldev = file(os.devnull, 'w')
nuldev = opennn(os.devnull, 'w')
else:
nuldev = sys.stderr

Expand Down

0 comments on commit 2def8b2

Please sign in to comment.