Skip to content

Commit

Permalink
Model backup bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Apr 23, 2018
1 parent 2e9abd7 commit d60e9bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def backup_file(directory, filename):
backupfile = origfile + '.bk'
if exists(backupfile):
os.remove(backupfile)
os.rename(origfile, backupfile)
if exists(origfile):
os.rename(origfile, backupfile)

# From: https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c
def rotate_image(image, angle, rotated_width=None, rotated_height=None):
Expand Down

0 comments on commit d60e9bb

Please sign in to comment.