ac9487d9a381e4f0f2b769524da27e4baed45189,kur/utils/environtools.py,EnvironmentalVariable,__enter__,#EnvironmentalVariable#,37

Before Change


		 Enters the context, setting the temporary environmental variables.
		
		self.old_vars = {}
		for k, v in self.vars.items():
			self.old_vars[k] = os.environ.get(k)
			if v is None:
				if k in os.environ:
					del os.environ[k]
			else:
				os.environ[k] = v

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	def __exit__(self, exc_type, exc_value, traceback):
		 Exists the context, restoring the original environmental variables.
		
		for k, v in self.old_vars.items():

After Change


	def __enter__(self):
		 Enters the context, setting the temporary environmental variables.
		
		self.push()

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	def push(self):
		 Sets the environmental variables. Idempotent.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: deepgram/kur
Commit Name: ac9487d9a381e4f0f2b769524da27e4baed45189
Time: 2017-01-19
Author: ajsyp@syptech.net
File Name: kur/utils/environtools.py
Class Name: EnvironmentalVariable
Method Name: __enter__


Project Name: facebook/FAI-PEP
Commit Name: d046d58b4e5bfb55596829c866aa1b728cdf0d2e
Time: 2018-03-07
Author: feisun@fb.com
File Name: benchmarking/platforms/android/android_platform.py
Class Name: AndroidPlatform
Method Name: copyFilesToPlatform


Project Name: AlexsLemonade/refinebio
Commit Name: b492aac4d2805b65f66e789cb3d388ab5f0119c8
Time: 2018-06-27
Author: dongbo.hu@gmail.com
File Name: workers/data_refinery_workers/processors/agilent_twocolor.py
Class Name:
Method Name: _create_result_objects


Project Name: quiltdata/quilt
Commit Name: 511dd8aa75f9148415c8f9efc91257c62e503e2e
Time: 2019-10-09
Author: armandmcqueen@users.noreply.github.com
File Name: api/python/tests/integration/test_packages.py
Class Name: PackageTest
Method Name: test_set_package_entry_as_object