Skip to content

Commit 12c17fb

Browse files
committed
Made --force less picky on argument names
1 parent 9d05b5a commit 12c17fb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cities_light/management/commands/cities_light.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,11 @@ def handle(self, *args, **options):
102102
for url in SOURCES:
103103
destination_file_name = url.split('/')[-1]
104104

105-
force = options.get('force_all', False) or \
106-
destination_file_name in options.get('force', [])
105+
force = options.get('force_all', False)
106+
if not force:
107+
for f in options['force']:
108+
if f in destination_file_name or f in url:
109+
force = True
107110

108111
geonames = Geonames(url, force=force)
109112
downloaded = geonames.downloaded

0 commit comments

Comments
 (0)