Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 265748

Summary: media-video/pitivi-0.11.3 uses a variable called "as" which is a reserved word in python 2.6
Product: Gentoo Linux Reporter: Mike Auty (RETIRED) <ikelos>
Component: Current packagesAssignee: Hanno Böck <hanno>
Status: RESOLVED FIXED    
Severity: normal CC: gstreamer
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 230205    
Attachments: pitivi-0.11.3-reserved-word.patch

Description Mike Auty (RETIRED) gentoo-dev 2009-04-11 11:25:21 UTC
Hiya, so when emerging pitivi I get this error (followed by another almost identical one):

 * Byte compiling python modules for python-2.6 .. ...
Compiling //usr/lib/pitivi/python/pitivi/timeline/timeline.py ...
SyntaxError: ('invalid syntax', ('//usr/lib/pitivi/python/pitivi/timeline/timeline.py', 198, 10, '        as = self.audiocomp._getAutoSettings()\n'))

And attempting to start piviti gives the following:

mike@ikelos ~ $ pitivi
Traceback (most recent call last):
  File "/usr/bin/pitivi", line 122, in <module>
    _run_pitivi()
  File "/usr/bin/pitivi", line 111, in _run_pitivi
    import pitivi.pitivi as ptv
  File "//usr/lib/pitivi/python/pitivi/pitivi.py", line 33, in <module>
    from project import Project, file_is_project
  File "//usr/lib/pitivi/python/pitivi/project.py", line 30, in <module>
    from timeline.timeline import Timeline
  File "/usr/lib/pitivi/python/pitivi/timeline/timeline.py", line 198
    as = self.audiocomp._getAutoSettings()
     ^
SyntaxError: invalid syntax

I'm pretty sure this is just because of using 'as' as a variable name, which I'm got introduced as a reserved word in python-2.6.  I've attached a patch that renames it (and the associated video variable, to keep the naming consistent).
Comment 1 Mike Auty (RETIRED) gentoo-dev 2009-04-11 11:26:05 UTC
Sorry, wasn't thinking.  I should've assigned directly...
Comment 2 Mike Auty (RETIRED) gentoo-dev 2009-04-11 11:26:25 UTC
Created attachment 187970 [details, diff]
pitivi-0.11.3-reserved-word.patch
Comment 3 Hanno Böck gentoo-dev 2009-04-15 07:54:30 UTC
done