mirror of
https://github.com/Pardus-LiderAhenk/ahenk
synced 2024-11-22 15:32:19 +03:00
check file exist for removing
This commit is contained in:
parent
1c0f5206fa
commit
a3374ebe65
1 changed files with 4 additions and 3 deletions
|
@ -2,15 +2,15 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Author: Volkan Şahin <volkansah.in> <bm.volkansahin@gmail.com>
|
# Author: Volkan Şahin <volkansah.in> <bm.volkansahin@gmail.com>
|
||||||
|
|
||||||
|
import datetime
|
||||||
import grp
|
import grp
|
||||||
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import pwd
|
import pwd
|
||||||
import shutil
|
import shutil
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import hashlib
|
|
||||||
import datetime
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ class Util:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def delete_file(full_path):
|
def delete_file(full_path):
|
||||||
try:
|
try:
|
||||||
|
if Util.is_exist(full_path):
|
||||||
os.remove(full_path)
|
os.remove(full_path)
|
||||||
except:
|
except:
|
||||||
raise
|
raise
|
||||||
|
|
Loading…
Reference in a new issue