[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #23859 [Core Tor/Stem]: stem parse_file doesn't handle stdin
#23859: stem parse_file doesn't handle stdin
-------------------------------+--------------------
Reporter: teor | Owner: atagar
Type: defect | Status: new
Priority: Medium | Milestone:
Component: Core Tor/Stem | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-------------------------------+--------------------
The code looks like:
{{{
from sys import stdin
from stem.descriptor import parse_file
new_micro_digests = set()
for desc in parse_file(stdin, validate = True):
new_micro_digests.add(desc.digest)
}}}
The stack trace looks like:
{{{
$ cat 2017-10-14-17-05-00-micro | ./get_micro_fp.py
Traceback (most recent call last):
File "./get_micro_fp.py", line 9, in <module>
for desc in parse_file(stdin, validate = True):
File "/Users/dev/stem/stem/descriptor/__init__.py", line 196, in
parse_file
initial_position = descriptor_file.tell()
IOError: [Errno 29] Illegal seek
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23859>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs