Opened 12 years ago

Closed 12 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 12 years ago.

Download all attachments as: .zip

Change History (5)

by turek, 12 years ago

Attachment: sep_patch.diff added

comment:1 by neteler, 12 years ago

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 comment:2 by martinl, 12 years ago

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 by martinl, 12 years ago

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

comment:4 by martinl, 12 years ago

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