mirror of
https://github.com/djohnlewis/stackdump
synced 2024-12-04 23:17:37 +00:00
Modified download_site_info script to create the data directory if it doesn't exist.
This commit is contained in:
parent
c1ae870e3d
commit
16e5530a82
@ -10,6 +10,10 @@ import sys
|
||||
script_dir = os.path.dirname(sys.argv[0])
|
||||
sites_file_path = os.path.join(script_dir, '../../../../data/sites')
|
||||
|
||||
# ensure the data directory exists
|
||||
if not os.path.exists(os.path.dirname(sites_file_path)):
|
||||
os.mkdir(os.path.dirname(sites_file_path))
|
||||
|
||||
# download the sites RSS file
|
||||
print 'Downloading StackExchange sites RSS file...',
|
||||
urllib.urlretrieve('http://stackexchange.com/feeds/sites', sites_file_path)
|
||||
|
Loading…
Reference in New Issue
Block a user