~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Albisetti
  • Date: 2008-03-03 17:12:37 UTC
  • mto: (3350.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 3351.
  • Revision ID: beuno@beuno-laptop-20080303171237-x3ewkoecmv1ab2ue
Core code for automatic plugin suggestion

Show diffs side-by-side

added added

removed removed

Lines of Context:
2576
2576
 
2577
2577
    def __init__(self, timezone):
2578
2578
        self.timezone = timezone
 
2579
 
 
2580
 
 
2581
class CommandAvailableInPlugin(StandardError):
 
2582
    
 
2583
    internal_error = False
 
2584
 
 
2585
    def __init__(self, cmd_name, plugin_metadata, provider):
 
2586
        
 
2587
        self.plugin_metadata = plugin_metadata
 
2588
        self.cmd_name = cmd_name
 
2589
        self.provider = provider
 
2590
 
 
2591
    def __str__(self):
 
2592
 
 
2593
        _fmt = ('"%s" is not a standard bzr command. \n' 
 
2594
                'However, the following official plugin provides this command: %s\n'
 
2595
                'You can install it by going to: %s'
 
2596
                % (self.cmd_name, self.plugin_metadata['name'], 
 
2597
                    self.plugin_metadata['url']))
 
2598
 
 
2599
        return _fmt
 
2600
 
 
2601
 
 
2602
class NoPluginAvailable(BzrError):
 
2603
    pass    
 
2604