equal
deleted
inserted
replaced
3 """ |
3 """ |
4 Process zonefiles. |
4 Process zonefiles. |
5 """ |
5 """ |
6 |
6 |
7 import codecs |
7 import codecs |
8 from datetime import datetime |
8 import datetime |
9 import logging |
9 import logging |
10 |
10 |
11 log = logging.getLogger('pvl.dns.zone') |
11 log = logging.getLogger('pvl.dns.zone') |
12 |
12 |
13 class ZoneError (Exception) : |
13 class ZoneError (Exception) : |
48 |
48 |
49 # split prefix |
49 # split prefix |
50 prefix, raw_line = raw_line.split(': ', 1) |
50 prefix, raw_line = raw_line.split(': ', 1) |
51 |
51 |
52 # parse it out |
52 # parse it out |
53 timestamp = datetime.strptime(prefix, cls.PARSE_DATETIME_FORMAT) |
53 timestamp = datetime.datetime.strptime(prefix, cls.PARSE_DATETIME_FORMAT) |
54 |
54 |
55 log.debug("%s:%d: ts=%r", filename, lineno, ts) |
55 log.debug("%s:%d: ts=%r", filename, lineno, ts) |
56 |
56 |
57 log.debug("%s:%d: %s", filename, lineno, raw_line) |
57 log.debug("%s:%d: %s", filename, lineno, raw_line) |
58 |
58 |