BIND 10 #2298: Xfrout/zones and XML stats
BIND 10 Development
do-not-reply at isc.org
Thu Nov 1 21:17:57 UTC 2012
#2298: Xfrout/zones and XML stats
-------------------------------------+-------------------------------------
Reporter: jreed | Owner: naokikambe
Type: | Status: reviewing
defect | Milestone:
Priority: | Sprint-20121106
medium | Resolution:
Component: | Sensitive: 0
statistics | Sub-Project: Core
Keywords: | Estimated Difficulty: 5
Defect Severity: N/A | Total Hours: 2
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jelte):
Very general, and unrelated note: b10-statshttpd prints GET requests to
stderr directly. This should be done through the logging api (perhaps by
making a tiny class that acts as a stream that can be printed to, if the
source of these messages is the python http module)
Probably because of the above, make check prints a lot of mostly
uninteresting crap (at least, when the tests pass :p) and it may be non-
obvious that it is skipping some if you don't have python3-lxml installed.
Anyway, this is most likely something for a different ticket.
on to the branch itself: I have been looking at the diffs between commits
a67531278a9b431fa64816274477a1e41d64f9e9 and
f5caa308b4534eb70cd5996c2e809a36ac36ee6d (in trac2298_7)
In stats_httpd.py.in:
send_head() (lines 124+):
the code could use a few comments as to what it is doing here, I see a lot
of path modifications, but it is not directly clear what is being modified
and why (in the first case of the if at line 125)
open_template() (lines 553+):
{{{
lines = None
f = None
try:
f = open(file_name, 'r')
lines = "".join(f.readlines())
except IOError as err:
raise StatsHttpdDataError(
"%s: %s" % (err.__class__.__name__, err))
finally:
if f: f.close()
}}}
this can be done slightly more straightforward with a 'with'-statement:
{{{
try:
with open(file_name, 'r') as f:
lines = "".join(f.readlines())
except IOError as err:
raise StatsHttpdDataError(
"%s: %s" % (err.__class__.__name__, err))
}}}
b10-stats-httpd_test.py:
in test_do_GET's check_XML_URL_PATH (lines 256+):
Not entirely sure if root.find('item') is supposed to ever return
anything, but in the current set of tests it is always an empty iterator,
and the checks in that final loop are never reached.
(I was looking to see why the check at line 260 is an assertFalse, not an
assertTrue)
--
Ticket URL: <http://bind10.isc.org/ticket/2298#comment:18>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list