~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/HTTPTestUtil.py

  • Committer: Robert Collins
  • Date: 2005-10-09 22:59:39 UTC
  • Revision ID: robertc@robertcollins.net-20051009225939-abab7cf72ffdb97f
merge gustavos http_proxy fix for test cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        self._http_thread = threading.Thread(target=self._http_start)
138
138
        self._http_thread.setDaemon(True)
139
139
        self._http_thread.start()
 
140
        self._http_proxy = os.environ.get("http_proxy")
 
141
        if self._http_proxy is not None:
 
142
            del os.environ["http_proxy"]
140
143
 
141
144
    def tearDown(self):
142
145
        self._http_running = False
143
146
        self._http_thread.join()
 
147
        if self._http_proxy is not None:
 
148
            import os
 
149
            os.environ["http_proxy"] = self._http_proxy
144
150
        TestCaseInTempDir.tearDown(self)
145
151