/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/trace.py

  • Committer: Jelmer Vernooij
  • Date: 2020-02-18 01:57:45 UTC
  • mto: This revision was merged to the branch mainline in revision 7493.
  • Revision ID: jelmer@jelmer.uk-20200218015745-q2ss9tsk74h4nh61
drop use of future.

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
    :return: A path to the log file
202
202
    :raise EnvironmentError: If the cache directory could not be created
203
203
    """
204
 
    brz_log = os.environ.get('BRZ_LOG')
 
204
    brz_log = osutils.path_from_environ('BRZ_LOG')
205
205
    if brz_log:
206
206
        return brz_log
207
207
    return os.path.join(bedding.cache_dir(), 'brz.log')
509
509
    elif not getattr(exc_object, 'internal_error', True):
510
510
        report_user_error(exc_info, err_file)
511
511
        return errors.EXIT_ERROR
512
 
    elif isinstance(exc_object, EnvironmentError):
 
512
    elif osutils.is_environment_error(exc_object):
513
513
        if getattr(exc_object, 'errno', None) == errno.EPIPE:
514
514
            err_file.write("brz: broken pipe\n")
515
515
            return errors.EXIT_ERROR