← Back to team overview

desktop-packages team mailing list archive

[Bug 577986] Re: Difference between documentation and functionality of gio.File.replace()

 

This is fixed in the current GI bindings. Checking
/usr/share/gir-1.0/Gio-2.0.gir, I see

      <method name="replace" c:identifier="g_file_replace" throws="1">
      [...]
                <parameter name="etag" transfer-ownership="none" allow-none="1">

i. e. it has [allow-none].

** Package changed: pygobject (Ubuntu) => glib2.0 (Ubuntu)

** Changed in: glib2.0 (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to glib2.0 in Ubuntu.
https://bugs.launchpad.net/bugs/577986

Title:
  Difference between documentation and functionality of
  gio.File.replace()

Status in “glib2.0” package in Ubuntu:
  Fix Released

Bug description:
  According to the documentation for gio.File.replace() the first
  argument is either an ETAG or 'None'.
  <http://library.gnome.org/devel/pygobject/stable/class-giofile.html
  #method-giofile--replace>

  However, when I execute the following line of code: "returnvalue =
  local_patch.replace( None, False, gio.FILE_CREATE_REPLACE_DESTINATION
  )" (part of a not yet finished revision of lp:mergimus ) I get the
  following error message:

  Traceback (most recent call last):
    File "/home/qense/Ontwikkeling/mergimus/mergimus/MergimusPatchviewHBox.py", line 156, in test_patch_action_activate_cb
      returnvalue = local_patch.replace( None, False, gio.FILE_CREATE_REPLACE_DESTINATION )
  TypeError: gio.File.replace() argument 1 must be string, not None

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/577986/+subscriptions