want a wrapper for os.rename that puts the filenames into the error

Bug #492144 reported by Martin Pool
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Ross Lagerwall

Bug Description

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

  affects bzr
  status confirmed
  importance medium
  tags easy error-reporting

Python's built-in os.rename does not report the filenames when it fails.

This makes it hard to debug errors like <https://launchpad.net/bugs/491763>.

It would be nice to wrap it in osutils.rename and manually insert the to and from
filenames.

OSError has only one filename slot in the upstream API but we could add new
attributes and override the message, or something like that.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAksYadkACgkQPGPKP6Cz6ItBmgCeJht8gPPcx3iBIK9BtD38VMzD
wUQAnjldDF7kk9ZC8p46uWhmKUMl1qgN
=PLIe
-----END PGP SIGNATURE-----

Related branches

Jelmer Vernooij (jelmer)
tags: added: easy error-reporting
Martin Pool (mbp)
Changed in bzr:
status: Confirmed → In Progress
Martin Packman (gz)
Changed in bzr:
assignee: nobody → Ross Lagerwall (rosslagerwall)
milestone: none → 2.6b1
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.