Ticket #1741 (closed defect: fixed)

Opened 8 months ago

Last modified 3 months ago

Wrong key in option G_OPT_F_SEP

Reported by: turek Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Default Version: unspecified
Keywords: Cc:
Platform: Unspecified CPU: Unspecified

Description

G_OPT_F_SEP has separator key however modules (r.out.xyz, m.proj...) uses sep key.

It produces e. g. this error:

r.out.xyz input=landsat@PERMANENT                                               
Traceback (most recent call last):
  File "/usr/local/grass-7.0.svn/scripts/r.out.xyz", line
45, in <module>
    main()
  File "/usr/local/grass-7.0.svn/scripts/r.out.xyz", line
40, in main
    ret = grass.run_command("r.stats", flags = "1gn", input
= options['input'], fs = options['sep'], output = output)
KeyError: 'sep'

Attached patch should fix it.

Attachments

sep_patch.diff Download (3.1 KB) - added by turek 8 months ago.

Change History

Changed 8 months ago by turek

follow-up: ↓ 2   Changed 8 months ago by neteler

I have applied your patch except for the shortening of "separator" to "sep" since GRASS also accepts less than the full parameter name (unless distinguable from other parameter names) in r53265.

in reply to: ↑ 1   Changed 7 months ago by martinl

Replying to neteler:

I have applied your patch except for the shortening of "separator" to "sep" since GRASS also accepts less than the full parameter name (unless distinguable from other parameter names) in r53265.

Keys in options dictionary cannot be shortened. Fixed in r53329 (patch provided by Stepan Turek).

  Changed 3 months ago by martinl

Seems to be fixed. Closing, please re-open if needed.

  Changed 3 months ago by martinl

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.