Skip to content

Commit

Permalink
Replace subprocess.call with os.rename
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDeCortix authored Apr 16, 2022
1 parent 8bc8af2 commit ac62855
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flask_images/core.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import division

from io import BytesIO as StringIO
from subprocess import call
import base64
import cgi
import datetime
Expand Down Expand Up @@ -344,7 +343,7 @@ def handle_request(self, path):
fh = open(tmp_path, 'wb')
fh.write(remote_file)
fh.close()
call(['mv', tmp_path, path])
os.rename(tmp_path, path)
else:
path = self.find_img(path)
if not path:
Expand Down

0 comments on commit ac62855

Please sign in to comment.