[AAA-193] Idmtool doesn't work with python3 Created: 09/Jan/20  Updated: 15/Jan/20  Resolved: 15/Jan/20

Status: Resolved
Project: aaa
Component/s: None
Affects Version/s: Magnesium
Fix Version/s: Magnesium, Sodium SR2

Type: Bug Priority: Medium
Reporter: Richard Kosegi Assignee: Jamo Luhrsen
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

AAA Version : master (0.11.0-SNAPSHOT)

Python 3.6.9 or Python 3.7.5 (probably other 3.x too, but not tested)



 Description   

Trying to run idmtool under python3 fails

python3.6 idmtool.py list-users
Traceback (most recent call last):
  File "idmtool.py", line 351, in <module>
    command = args.func.prog.split()[1:]
AttributeError: 'Namespace' object has no attribute 'func'
python3.6 -V 
Python 3.6.9


 Comments   
Comment by Richard Kosegi [ 09/Jan/20 ]

Note that Python2 is EOL

Comment by Jamo Luhrsen [ 09/Jan/20 ]

the issue here is that python2 was catching your missing argument (user) more cleanly in the
argparse package, but there is a bug with python3 that is not so clean. More details/comments
can be seen in the commit which also has a link to the upstream python bug.

Generated at Wed Feb 07 19:08:53 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.