~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-05 13:41:59 UTC
  • mfrom: (1963.1.4 run-subprocess)
  • Revision ID: pqm@pqm.ubuntu.com-20060905134159-ac8e1b01ac29c518
(jam) run_bzr_subprocess can remove env vars

Show diffs side-by-side

added added

removed removed

Lines of Context:
852
852
        def cleanup_environment():
853
853
            for env_var, value in env_changes.iteritems():
854
854
                if value is None:
855
 
                    del os.environ[env_var]
 
855
                    if env_var in os.environ:
 
856
                        del os.environ[env_var]
856
857
                else:
857
858
                    os.environ[env_var] = value
858
859