Opened 2 months ago

Closed 8 weeks ago

Last modified 7 weeks ago

#28508 closed defect (fixed)

Stem not checking for 'cached-microdescs.new' correctly

Reported by: opara Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When "contoller.get_microdescriptors()" is called, it checks to see if the file "cached-microdescs" exists before creating a "stem.descriptor.reader.DescriptorReader" object. The problem is that "cached-microdescs" may not exist, but "cached-microdescs.new" does.

A simple fix for this is to modify stem/control.py:1795 (as of commit 73e5bd3e4f5) from:

elif not os.path.exists(cached_descriptor_path):

to:

elif not os.path.exists(cached_descriptor_path) and not os.path.exists(cached_descriptor_path+'.new'):

Child Tickets

Change History (3)

comment:1 Changed 2 months ago by opara

Component: - Select a componentCore Tor/Stem
Owner: set to atagar

comment:2 Changed 8 weeks ago by atagar

Resolution: fixed
Status: newclosed

Hi opara, sorry about the delay! Fix pushed. It's a tad more than that (the above fix corrects the check, but didn't make us read from the cached-microdescs.new). Made some other improvements to this while we were at it.

https://gitweb.torproject.org/stem.git/commit/?id=ddb1a36

Thanks for reporting this!

comment:3 Changed 7 weeks ago by opara

Thanks! Works great now.

Note: See TracTickets for help on using tickets.