/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/backend/info.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-20 14:01:33 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060820140133-3b3e5fe5c0d46f7e
Handle permission denied exceptions properly.

2006-08-20  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/frontend/gtk/__init__.py: proper handling of permission denied cases
    * olive/backend/info.py: handle permission denied exception in is_branch()
    * olive/backend/fileops.py: handle permission denied exception in status()
    * olive/backend/errors.py: added PermissionDenied exception

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.branch import Branch
23
23
from bzrlib.workingtree import WorkingTree
24
24
 
25
 
from errors import (DifferentBranchesError, NotBranchError, PrefixFormatError,
26
 
                    RevisionValueError)
 
25
from errors import (DifferentBranchesError, NotBranchError, PermissionDenied,
 
26
                    PrefixFormatError, RevisionValueError)
27
27
 
28
28
def diff(revision=None, file_list=None, diff_options=None, prefix=None):
29
29
    """ Save the diff into a temporary file.
257
257
        branch = Branch.open_containing(location)[0]
258
258
    except errors.NotBranchError:
259
259
        return False
 
260
    except errors.PermissionDenied:
 
261
        raise PermissionDenied(location)
260
262
    else:
261
263
        return True
262
264