We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f305ed2 + 0763558 commit 5c74acaCopy full SHA for 5c74aca
qiita_client/qiita_client.py
@@ -919,10 +919,11 @@ def delete_file_from_central(self, filepath):
919
The given filepath - to be transparent in plugin code.
920
"""
921
if self._plugincoupling == 'filesystem':
922
- if os.path.isdir(filepath):
923
- shutil.rmtree(filepath)
924
- else:
925
- os.remove(filepath)
+ if os.path.exists(filepath):
+ if os.path.isdir(filepath):
+ shutil.rmtree(filepath)
+ else:
926
+ os.remove(filepath)
927
elif self._plugincoupling == 'https':
928
# will return in internal server error, when qiita is in productive
929
# mode
0 commit comments