scalyr / scalyr-tool

Command-line tool for accessing Scalyr services
Apache License 2.0
56 stars 37 forks source link

Fixed verbose option for query #10

Closed fatroom closed 7 years ago

fatroom commented 7 years ago

Query command fails in verbose mode while trying to log request headers. This happens due to type mismatch.

./scalyr query 'Error' --verbose
Using arguments: Namespace(columns='', command='query', count=10, end='', filter='Error', mode='', output='multiline', priority='high', server='https://www.scalyr.com', start='', token='', verbose=True)
Connecting to www.scalyr.com via https
Request headers:
Traceback (most recent call last):
  File "./scalyr", line 591, in <module>
    command_func(parser)
  File "./scalyr", line 218, in commandQuery
    "priority": args.priority
  File "./scalyr", line 86, in sendRequest
    print_stderr(headers)
  File "./scalyr", line 46, in print_stderr
    sys.stderr.write(message + '\n')
TypeError: unsupported operand type(s) for +: 'dict' and 'str'
czerwingithub commented 7 years ago

Thanks for catching this. I've merged your fix in.