williamh / pybugz

Python interface to Bugzilla.
http://www.liquidx.net/pybugz/
GNU General Public License v2.0
79 stars 60 forks source link

bugz attach fails without -p option #88

Open jbeich opened 9 years ago

jbeich commented 9 years ago

It appears to be a recent regression not present in 0.11.1. I haven't tried to git bisect due to lack of a test account.

$ bugz attach -c text/plain -t blah 12345 blah.txt
Traceback (most recent call last):
  File "/usr/local/bin/bugz", line 58, in <module>
    sys.exit(main())
  File "/usr/local/bin/bugz", line 43, in main
    args.func(conn)
  File "/usr/local/lib/python3.4/site-packages/bugz/cli.py", line 293, in attach
    result = conn.call_bz(conn.bz.Bug.add_attachment, params)
  File "/usr/local/lib/python3.4/site-packages/bugz/connection.py", line 154, in call_bz
    return method(params)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 1098, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 1431, in __request
    allow_none=self.__allow_none).encode(self.__encoding)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 951, in dumps
    data = m.dumps(params)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 504, in dumps
    dump(v, write)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 526, in __dump
    f(self, value, write)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 597, in dump_struct
    dump(v, write)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 526, in __dump
    f(self, value, write)
  File "/usr/local/lib/python3.4/xmlrpc/client.py", line 530, in dump_nil
    raise TypeError("cannot marshal None unless allow_none is enabled")
TypeError: cannot marshal None unless allow_none is enabled