[tor-bugs] #28494 [Core Tor/Stem]: Please provide an equivalent for UnparseableDescriptor from metrics-lib
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Nov 26 18:07:23 UTC 2018
#28494: Please provide an equivalent for UnparseableDescriptor from metrics-lib
---------------------------+------------------------
Reporter: irl | Owner: atagar
Type: enhancement | Status: new
Priority: Medium | Milestone:
Component: Core Tor/Stem | Version:
Severity: Normal | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------+------------------------
Comment (by atagar):
Hi irl, sorry about the delay. You filed quite a few interesting tickets.
:P
Are you using parse_file() or a DescriptorReader? parse_file() is
documented as only raising TypeErrors when unable to determine the
descriptor type ("**TypeError** if we can't match the contents of the file
to a descriptor type"), and from my read of the code looks like it does.
The DescriptorReader however raises TypeErrors as a catch-all for parsing
failures.
Honestly I'm a little tempted to deprecate our DescriptorReader. I wrote
it for Karsten way back when I first began Stem and he asked for a class
that tracked when unprocessed files become available on disk. I've never
used it, and it's such a specialized use case I'm unaware of anyone else
using it either.
Do you need this class or would parse_file() work just as well for you?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28494#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list