Skip to content

Commit

Permalink
Release v0.2.6 (#32)
Browse files Browse the repository at this point in the history
* #24 Fix UTF-8
* Add changelog

Precommit-Verified: c89f389b623f6a77d7d8f4b34888128b6ff6d73c92a133ad290375ada5a77bab
  • Loading branch information
pryorda committed Nov 25, 2018
1 parent cec6783 commit 13b986c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog).

## [0.2.6] - 2019-11-24
### Changed
- Updated setup.py

### Fixed
- *[#24](https://github.com/pryorda/vmware_exporter/issues/24) UTF8 Error* @jnogol
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -15,7 +15,7 @@ FROM python:2.7-alpine

LABEL MAINTAINER="Daniel Pryor <daniel@pryorda.net>"
LABEL NAME=vmware_exporter
LABEL VERSION=0.2.5
LABEL VERSION=0.2.6

WORKDIR /opt/vmware_exporter/

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -7,8 +7,8 @@
author=vmware_exporter.__author__,
description='VMWare VCenter Exporter for Prometheus',
long_description=open('README.md').read(),
url='https://github.com/rverchere/vmware_exporter',
download_url=("https://github.com/rverchere/vmware_exporter/tarball/%s" %
url='https://github.com/pryorda/vmware_exporter',
download_url=("https://github.com/pryorda/vmware_exporter/tarball/%s" %
vmware_exporter.__version__),
keywords=['VMWare', 'VCenter', 'Prometheus'],
license=vmware_exporter.__license__,
Expand Down
4 changes: 2 additions & 2 deletions vmware_exporter/vmware_exporter.py
Expand Up @@ -129,7 +129,7 @@ def generate_latest_metrics(self, request):
if labels:
labelstr = '{{{0}}}'.format(','.join(
['{0}="{1}"'.format(
k, v.replace('\\', r'\\').replace('\n', r'\n').replace('"', r'\"'))
k, v.replace('\\', r'\\').replace('\n', r'\n').replace('"', r'\"').encode('utf-8'))
for k, v in sorted(labels.items())]))
else:
labelstr = ''
Expand All @@ -140,7 +140,7 @@ def generate_latest_metrics(self, request):
if isinstance(value, float):
output.append('{0}{1} {2}\n'.format(name, labelstr, _floatToGoString(value)))
if output != []:
request.write(''.join(output).encode('utf-8'))
request.write(''.join(output))
request.finish()
else:
request.setResponseCode(500, message=('cannot connect to vmware'))
Expand Down

0 comments on commit 13b986c

Please sign in to comment.