Windows: Don't try to delete URLs

This commit is contained in:
Mike Auty
2021-03-29 17:50:35 +01:00
parent ef258ec010
commit f3c3e2c4f9
@@ -9,6 +9,7 @@ import json
import logging
import lzma
import os
import urllib
from bisect import bisect
from typing import Tuple, Dict, Any, Optional, Union, List
from urllib import request, error, parse
@@ -998,7 +999,8 @@ if __name__ == '__main__':
filename = None
if args.guid is not None and args.pattern is not None:
filename = PdbRetreiver().retreive_pdb(guid = args.guid, file_name = args.pattern, progress_callback = pg_cb)
delfile = True
if urllib.parse.urlparse(filename, 'file').scheme == 'file':
delfile = True
elif args.file:
filename = args.file
else: