(self)
| 170 | os.system(cmd) |
| 171 | """ |
| 172 | def __enter__(self): |
| 173 | self.path = os.getcwd() |
| 174 | self.is_unc_path = self.path.startswith(r"\\") |
| 175 | if self.is_unc_path: |
| 176 | # change to c drive (as cmd.exe cannot handle UNC addresses) |
| 177 | os.chdir("C:") |
| 178 | return self.path |
| 179 | else: |
| 180 | # We return None to signal that there was no change in the working |
| 181 | # directory |
| 182 | return None |
| 183 | |
| 184 | def __exit__(self, exc_type, exc_value, traceback): |
| 185 | if self.is_unc_path: |
nothing calls this directly
no outgoing calls
no test coverage detected