From 8b1e2ba9ac59f2e1bc309cb8a29bd523b6948724 Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Fri, 16 Nov 2018 11:46:37 -0800 Subject: [PATCH] Remove duplicated functions in munkilib/updatecheck/download.py due to bad merge confict resolution --- code/client/munkilib/updatecheck/download.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/code/client/munkilib/updatecheck/download.py b/code/client/munkilib/updatecheck/download.py index 447eee92..3378587e 100644 --- a/code/client/munkilib/updatecheck/download.py +++ b/code/client/munkilib/updatecheck/download.py @@ -111,25 +111,6 @@ def enough_disk_space(item_pl, installlist=None, return False -def get_url_basename(url): - """For a URL, absolute or relative, return the basename string. - - e.g. "http://foo/bar/path/foo.dmg" => "foo.dmg" - "/path/foo.dmg" => "foo.dmg" - """ - - url_parse = urlparse.urlparse(url) - return os.path.basename(url_parse.path) - - -def get_download_cache_path(url): - """For a URL, return the path that the download should cache to. - - Returns a string.""" - cachedir = os.path.join(prefs.pref('ManagedInstallDir'), 'Cache') - return os.path.join(cachedir, get_url_basename(url)) - - def download_installeritem(item_pl, installinfo, uninstalling=False, precaching=False): """Downloads an (un)installer item.