Commits

Martin von Löwis  committed cb85c01

Check presence of file before deleting it.

  • Participants
  • Parent commits ba6c98b

Comments (0)

Files changed (1)

File pep381client/__init__.py

         for f in self.files_per_project.get(project, ()):
             self.remove_file(f)
         if os.path.exists(self.homedir+"/web/simple/"+project):
-            os.unlink(self.homedir+"/web/simple/"+project+"/index.html")
+            if os.path.exists(self.homedir+"/web/simple/"+project+"/index.html"):
+                os.unlink(self.homedir+"/web/simple/"+project+"/index.html")
             os.rmdir(self.homedir+"/web/simple/"+project)
         if os.path.exists(self.homedir+"/web/serversig/"+project):
             os.unlink(self.homedir+"/web/serversig/"+project)