~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
from bzrlib import option
44
44
from bzrlib.option import Option
45
45
import bzrlib.osutils
46
 
from bzrlib.revisionspec import RevisionSpec
47
46
from bzrlib.symbol_versioning import (deprecated_method, zero_eight)
48
47
import bzrlib.trace
49
48
from bzrlib.trace import mutter, note, log_error, warning, be_quiet
65
64
        k_unsquished = _unsquish_command_name(k)
66
65
    else:
67
66
        k_unsquished = k
68
 
    if not plugin_cmds.has_key(k_unsquished):
 
67
    if k_unsquished not in plugin_cmds:
69
68
        plugin_cmds[k_unsquished] = cmd
70
69
        mutter('registered plugin command %s', k_unsquished)
71
70
        if decorate and k_unsquished in builtin_command_names():
585
584
            sys.stdout.flush()
586
585
            return result
587
586
        except IOError, e:
588
 
            if not hasattr(e, 'errno'):
 
587
            if getattr(e, 'errno', None) is None:
589
588
                raise
590
589
            if e.errno != errno.EPIPE:
591
590
                # Win32 raises IOError with errno=0 on a broken pipe