Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
Wu Taizeng committed Feb 3, 2016
2 parents 0277e5d + c0aff0a commit ccb9608
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ Improved UDFs, lots of bug fixes and improvements on the API. There was a breaki
### Bugfixes

- [#177](https://github.com/influxdata/kapacitor/issues/177): Fix panic for show command on batch tasks.
- [#185](https://github.com/influxdata/kapacitor/issues/185): Fix panic in define command with invalid dbrp value.

## v0.10.0 [2016-01-26]

7 changes: 5 additions & 2 deletions cmd/kapacitor/main.go
Original file line number Diff line number Diff line change
@@ -348,17 +348,20 @@ func (d *dbrps) String() string {
func (d *dbrps) Set(value string) error {
dbrp := kapacitor.DBRP{}
if len(value) == 0 {
return fmt.Errorf("dbrp cannot be empty")
return errors.New("dbrp cannot be empty")
}
var n int
if value[0] == '"' {
dbrp.Database, n = parseQuotedStr(value)
} else {
n = strings.IndexRune(value, '.')
if n == -1 {
return errors.New("does not contain a '.', it must be in the form \"dbname\".\"rpname\" where the quotes are optional.")
}
dbrp.Database = value[:n]
}
if value[n] != '.' {
return fmt.Errorf("dbrp must specify retention policy, do you have a missing or extra '.'?")
return errors.New("dbrp must specify retention policy, do you have a missing or extra '.'?")
}
value = value[n+1:]
if value[0] == '"' {

0 comments on commit ccb9608

Please sign in to comment.