Skip to content

Commit

Permalink
fw dosyalarina birden fazla kerneltz parametresinin eklenmesi onlendi
Browse files Browse the repository at this point in the history
  • Loading branch information
volkandod authored May 23, 2017
1 parent 6d99209 commit 3b23044
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,12 @@ def add_kerneltz(folder_path, file_name):
try:
cp_file = folder_path + file_name + ".tmp"
org_file = folder_path + file_name
sed_cmd = "sed \"s/ -m time / -m time --kerneltz /g\" " + org_file + " > " + cp_file + " ; mv " + cp_file + \
p = subprocess.Popen(["grep","m time --kerneltz",org_file], stdout=subprocess.PIPE)
out, err = p.communicate()
if len(out) == 0:
sed_cmd = "sed \"s/ -m time / -m time --kerneltz /g\" " + org_file + " > " + cp_file + " ; mv " + cp_file + \
" " + org_file
subprocess.call([sed_cmd], shell=True)
subprocess.call([sed_cmd], shell=True)
except Exception as e:
filelogger.send_log("error"," while adding --kerneltz parameter : "+str(e))

Expand Down

0 comments on commit 3b23044

Please sign in to comment.