Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #10977
Closed
Open
Issue created Feb 20, 2014 by Karsten Loesing@karsten

parse_file should warn if the user attempts to parse a tarball

The following code throws a ValueError at some point:

from stem.descriptor import parse_file
for desc in parse_file('server-descriptors-2014-02.tar',
                       'server-descriptor 1.0'):
  pass

atagar and I figured out that parse_file is attempting to parse the tarball as text file. And it actually finds text portions that are server descriptors. But the tarball file also contains non-text stuff that makes stem unhappy.

The solution is probably to warn if the input file to parse_file is a text file and not a binary file.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking