Browse files

Don't bomb out if you couldn't download a pic, and later try to link to

it.
  • Loading branch information...
1 parent 574c966 commit 9ba645b52102311dd8c0c938e8554390ed4f0852 @rodbegbie rodbegbie committed Jun 7, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 flickrtouchr.py
View
3 flickrtouchr.py
@@ -300,10 +300,11 @@ def getphoto(id, token, filename):
# Skip files that exist
if os.access(target, os.R_OK):
+ inodes[photoid] = target
continue
# Look it up in our dictionary of inodes first
- if inodes.has_key(photoid) and os.access(inodes[photoid], os.R_OK):
+ if photoid in inodes and inodes[photoid] and os.access(inodes[photoid], os.R_OK):
# woo, we have it already, use a hard-link
os.link(inodes[photoid], target)
else:

0 comments on commit 9ba645b

Please sign in to comment.