Ticket #2846 (new defect)

Opened 2 years ago

Last modified 2 years ago

view source not parsing bundle path properly

Reported by: walter Owned by:
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
Component: sugar Version: Git as of bugdate
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

The LearnWriting Activity uses a Java-style bundle-path. View Source seems to be stopping at the top-level trying to find a .py file.

Traceback (most recent call last):

File "/usr/lib/python2.7/site-packages/jarabe/view/palettes.py", line 105, in

view_sourcecb

setup_view_source(self._home_activity)

File "/usr/lib/python2.7/site-packages/jarabe/view/viewsource.py", line 89, in

setup_view_source

activity.get_title())

File "/usr/lib/python2.7/site-packages/jarabe/view/viewsource.py", line 149, i

n init

self._source_display.file_path = self._selected_file

File "/usr/lib/python2.7/site-packages/jarabe/view/viewsource.py", line 461, i

n _set_file_path

self._buffer.set_text(open(self._file_path, 'r').read())

IOError: [Errno 2] No existe el fichero o el directorio: '/home/walter/Activitie
s/LearningWriting.activity/com.py'

Attachments

0001-properly-parse-bundle_path-with-depth-greater-than-1.patch Download (1.5 KB) - added by walter 2 years ago.
first pass at a patch

Change History

Changed 2 years ago by walter

first pass at a patch

Changed 2 years ago by walter

The attached patch seems to work, but there must be a simpler way???

Note: See TracTickets for help on using tickets.