Opened 7 years ago

Closed 7 years ago

#1741 closed defect (fixed)

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:
CPU: Unspecified Platform: 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 (1)

sep_patch.diff (3.1 KB) - added by turek 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by turek

Attachment: sep_patch.diff added

comment:1 Changed 7 years 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.

comment:2 in reply to:  1 Changed 7 years 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).

comment:3 Changed 7 years ago by martinl

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

comment:4 Changed 7 years ago by martinl

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.