http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11331
Revision: 11331 Author: legoktm Date: 2013-04-03 20:03:54 +0000 (Wed, 03 Apr 2013) Log Message: ----------- Check that the api_secret key is set before checking it's value
Modified Paths: -------------- trunk/pywikipedia/flickrripper.py
Modified: trunk/pywikipedia/flickrripper.py =================================================================== --- trunk/pywikipedia/flickrripper.py 2013-04-03 20:01:45 UTC (rev 11330) +++ trunk/pywikipedia/flickrripper.py 2013-04-03 20:03:54 UTC (rev 11331) @@ -501,7 +501,7 @@ 'Any flickr user can get a key at http://www.flickr.com/services/api/keys/apply/') return
- if config.flickr['api_secret']: + if 'api_secret' in config.flickr and config.flickr['api_secret']: flickr = flickrapi.FlickrAPI(config.flickr['api_key'], config.flickr['api_secret']) (token, frob) = flickr.get_token_part_one(perms='read') if not token: # The user still hasn't authorised this app yet, get_token_part_one() will have spawn a browser window
pywikipedia-svn@lists.wikimedia.org