Editing bookmarks broken on Mac OS X

Bug #390450 reported by Neil Martinsen-Burrell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Fix Released
High
Neil Martinsen-Burrell

Bug Description

Editing bookmarks using the external editor is broken on OS X:
nmb@guttle[~/src/bzr/bzr-explorer/lib]$ bzr explore . [09-06-21 21:24]
Traceback (most recent call last):
  File "/Users/nmb/.bazaar/plugins/explorer/lib/explorer.py", line 1010, in do_bookmarks_edit_my
    self.edit_file(self._my_profile.bookmarks_path())
  File "/Users/nmb/.bazaar/plugins/explorer/lib/explorer.py", line 773, in edit_file
    if sys.platform == 'darwin' and not os.path.exists():
TypeError: exists() takes exactly 1 argument (0 given)

The fix is very simple:

nmb@guttle[~/src/bzr/bzr-explorer/lib]$ bzr diff [09-06-21 21:25]
=== modified file 'lib/explorer.py'
--- lib/explorer.py 2009-06-21 18:46:26 +0000
+++ lib/explorer.py 2009-06-22 02:25:51 +0000
@@ -770,7 +770,7 @@
             self.edit_file(path)

     def edit_file(self, path):
- if sys.platform == 'darwin' and not os.path.exists():
+ if sys.platform == 'darwin' and not os.path.exists(path):
             # open -t on OS X requires the file to be there
             open(path, 'w').close()
         self.run_app(self._editor.split() + [path])

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Thanks for the patch. Applied in rev 97.

Changed in bzr-explorer:
status: New → Fix Released
Revision history for this message
Alexander Belchenko (bialix) wrote :

Neil, mark you branch as merged, please.

Changed in bzr-explorer:
assignee: nobody → Neil Martinsen-Burrell (nmb)
importance: Undecided → High
milestone: none → 0.4
Changed in bzr-explorer:
milestone: 0.4 → 0.3.1
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.