def save_tmp_udocker_env(self): # Avoid override global variables if SysUtils.is_variable_in_environment("UDOCKER_DIR"): self.udocker_dir_orig = SysUtils.get_environment_variable( "UDOCKER_DIR") # Set temporal global vars SysUtils.set_environment_variable("UDOCKER_DIR", self.udocker_dir)
def restore_udocker_env(self): if self.udocker_dir_orig: SysUtils.set_environment_variable("UDOCKER_DIR", self.udocker_dir_orig) else: SysUtils.delete_environment_variable("UDOCKER_DIR")