Skip to content

Commit 8d1e37e

Browse files
author
Pavlos Parissis
committed
DOC: Fix various documentation issues
1 parent 4d5827d commit 8d1e37e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

haproxyadmin/haproxy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,8 @@ def server(self, hostname, backend=None):
554554
If ``backend`` specified then lookup is limited to that backend.
555555
556556
.. note::
557-
If a server is member of more than 1 backends then muliple
558-
objects for the same server is returned.
557+
If a server is member of more than 1 backend then muliple objects
558+
for the same server is returned.
559559
560560
:param hostname: servername to look for.
561561
:type hostname: ``string``

haproxyadmin/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,16 @@ def converter(value):
366366
"""Tries to convert input value to an integer.
367367
368368
If input can be safely converted to number it returns an ``int`` type.
369-
If input is a valid string(not empty) it returns that.
370-
In all other cases we return None, including the ones which raise
371-
exceptions when conversion fails.
369+
If input is a valid string but not an empty one it returns that.
370+
In all other cases we return None, including the ones which an
371+
``TypeError`` exception is raised by ``int()``.
372372
For floating point numbers, it truncates towards zero.
373373
374374
Why are we doing this?
375375
HAProxy may return for a metric either a number or zero or string or an
376376
empty string.
377377
378-
It is up to the caller to use correctly the returned value. If the returned
378+
It is up to the caller to correctly use the returned value. If the returned
379379
value is passed to a function which does math operations the caller has to
380380
filtered out possible ``None`` values.
381381
@@ -408,7 +408,7 @@ def converter(value):
408408
return value.strip() or None
409409
except TypeError:
410410
# This is to catch the case where input value is a data structure or
411-
# object it is very unlikely someone to pass those, but you never know.
411+
# object. It is very unlikely someone to pass those, but you never know.
412412
return None
413413

414414

@@ -455,7 +455,7 @@ def __getattr__(self, attr):
455455

456456

457457
def info2dict(raw_info):
458-
"""Build a dictionary structure.
458+
"""Build a dictionary structure from the output of 'show info' command.
459459
460460
:param raw_info: data returned by 'show info' UNIX socket command
461461
:type raw_info: ``list``

0 commit comments

Comments
 (0)