Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434804 - dev-db/mongodb - mms-agent: SyntaxError: invalid syntax File "agent.py", line 124 except Exception, e:
Summary: dev-db/mongodb - mms-agent: SyntaxError: invalid syntax File "agent.py", li...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Ultrabug
URL: https://jira.mongodb.org/browse/MMS-746
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-12 08:18 UTC by Peter Savichev (proton)
Modified: 2012-09-17 15:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Savichev (proton) 2012-09-12 08:18:20 UTC
Tested on mongodb 2.07 and 2.2.0 with mms-agent use flag.

After starting mms-agent:

cat /var/log/mongodb/mms-agent.log

SyntaxError: invalid syntax
  File "agent.py", line 124
    except Exception, e:
                    ^

Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/mms-agent start



# /etc/init.d/mms-agent start  
 * Starting mms-agent ...      [ ok ]                                                                                                                                                                          
# /etc/init.d/mms-agent stop    
 * Requesting mms-agent to stop ...
 * start-stop-daemon: no matching processes found   

# eselect python list 
Available Python interpreters:
  [1]   python2.7
  [2]   python3.1 *
  [3]   python3.2
Comment 1 Johan Bergström 2012-09-12 22:17:06 UTC
Couldn't find any mentions about not supporting python 3.x upstream (https://mms.10gen.com/help/install.html#requirements), but here's a ticket for adding it: https://jira.mongodb.org/browse/MMS-746

quote from issue: "This is a pretty low priority for us right now given the server side adoption rate of running only python 3. Given the current priorities, this is something that will likely happen in 2013."

I'll look into adding python_convert_shebangs (and requiring <py3) to the ebuild.
Comment 2 Johan Bergström 2012-09-12 22:32:04 UTC
Looking closer at the issue, it would probably be as easy as:

$ sed 's/python/python2/' /etc/init.d/mms-agent

..and adding python2 as explicit depend to mongodb ebuilds:
PYTHON_DEPEND="mms-agent? 2"
Comment 3 Ultrabug gentoo-dev 2012-09-17 15:16:59 UTC
Thanks guys for both reporting and solving the problem.

It's fixed in tree, I revbumped all versions to reflect this change and took the opportunity to update the old ebuilds version of mms-agent.