Closed abhinav-upadhyay closed 10 years ago
actually it looks like we don't need the unlink: with a rename, it's ok if the dest already exists. it will get overwritten. see
~/w/e/graph-explorer ❯❯❯ echo A > a; echo B > b; python2 -c "import os; os.rename('b', 'a')"
~/w/e/graph-explorer ❯❯❯ cat a
B
~/w/e/graph-explorer ❯❯❯ cat b
cat: b: No such file or directory
actually what i just said is only for linux, it wouldn't work on windows http://docs.python.org/2/library/os.html#os.rename
thanks!
Came across an OSError when I was trying to run update_metrics.py on a newer version (current master branch) of graph-explorer. If the file is not there, update_metrics.py will always fail there, better to ignore the error in this case.