From 9ba645b52102311dd8c0c938e8554390ed4f0852 Mon Sep 17 00:00:00 2001 From: rod Date: Sun, 7 Jun 2009 19:48:13 -0700 Subject: [PATCH] Don't bomb out if you couldn't download a pic, and later try to link to it. --- flickrtouchr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flickrtouchr.py b/flickrtouchr.py index 78c1f41..fc8c3e0 100755 --- a/flickrtouchr.py +++ b/flickrtouchr.py @@ -300,10 +300,11 @@ if __name__ == '__main__': # 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: -- 2.45.2