Skip to content

Commit df8ce58

Browse files
committed
cleaning scripts added
1 parent fc378bf commit df8ce58

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

jimutmap/sanity_checker.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -199,32 +199,14 @@ def sanity_check(min_lat_deg, max_lat_deg, min_lon_deg, max_lon_deg, zoom, verbo
199199
# Save (commit) the changes
200200
con.commit()
201201

202-
203-
204-
205-
# URL_ALL = []
206-
# print("Downloading all the road tiles: ")
207-
# for road_tile_name in road_img_ids:
208-
# xTile = road_tile_name.split('_')[0]
209-
# yTile = road_tile_name.split('_')[1]
210-
# URL_ALL.append([xTile, yTile])
211-
212-
# tp = ThreadPool(LOCKING_LIMIT)
213-
# tp.imap_unordered(lambda x: sanity_obj.get_img(x), URL_ALL) #pylint: disable= unnecessary-lambda #cSpell:words imap
214-
# tp.close()
215-
216-
# while(tp is not None):
217-
# rint("Waiting for thread to finish downloading road tiles")
218-
# time.sleep(5)
219-
220202
# continue the loop till there is no file left to download
221203
# generate the summary
222204

223205

224206

225207
# We can also close the connection if we are done with it.
226208
# Just be sure any changes have been committed or they will be lost.
227-
print("Download Sucessful")
209+
print("************************* Download Sucessful *************************")
228210
con.close()
229211

230212

test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import os
88
import glob
9+
import shutil
910
from jimutmap import api, sanity_check
1011

1112

@@ -52,9 +53,8 @@
5253
inp = input("(y/N) : ")
5354
if inp == 'y' or inp == 'yes' or inp == 'Y':
5455
for item in sqlite_temp_files:
55-
shutil.rmtree(item)
56+
os.remove(item)
5657

57-
os.remove("temp_sanity.sqlite")
5858

5959

6060
## Try to remove tree; if failed show an error using try...except on screen

0 commit comments

Comments
 (0)