pombreda / python-xmp-toolkit

Automatically exported from code.google.com/p/python-xmp-toolkit
Other
0 stars 1 forks source link

file_to_dict passes kwarg as positional arg. #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>>> from libxmp.utils import file_to_dict
>>> file_to_dict('sample.eps')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "libxmp/utils.py", line 68, in file_to_dict
    xmpfile.open_file(file_path, libxmp.files.XMP_OPEN_READ)
TypeError: open_file() takes exactly 2 arguments (3 given) 

What is the expected output? What do you see instead?
This function should return a dictionary. 
The second argument is passed as a positional argument and not a keyword
argument like 'open_file' requires. Changing the argument to a keyword
argument (in this case 'XMP_OPEN_READ' solves that problem but reveals
others (please see the attached patch).

What version of the product are you using? On what operating system?
python-xmp-toolkit 1.0-rc1 on Linux

Please provide any additional information below.
I have attached a patch that fixes these bugs.

Original issue reported on code.google.com by olsenpk@gmail.com on 18 Mar 2009 at 6:08

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by lniel...@spacetelescope.org on 16 Feb 2010 at 4:14