diff --git a/pym/cl_profile.py b/pym/cl_profile.py index 4b2abfb..29fc508 100644 --- a/pym/cl_profile.py +++ b/pym/cl_profile.py @@ -2025,7 +2025,8 @@ class profile(_file, _terms): FO = self.openNewFile(profileFile) buff = FO.read() FO.close() - os.remove(oldFile) + if os.path.exists(oldFile): + os.remove(oldFile) fd = os.open(oldFile, os.O_CREAT) os.close(fd) os.chmod(oldFile, self._mode)