diff --git a/Client/Client.py b/Client/Client.py index 844ca47..8f04e5d 100644 --- a/Client/Client.py +++ b/Client/Client.py @@ -66,8 +66,7 @@ def pathjoin(*args): # Join a set of URL paths while maintaining the correct # format of "/"'s between each part of the URL's pathway - args = [f.lstrip("/").rstrip("/") for f in args] - return "/".join(args) + "/" + return '/'.join([f.lstrip('/').rstrip('/') for f in args]) + '/' def savedEngineName(sha256, network256): if not network256: return sha256 @@ -265,7 +264,7 @@ def getNetworkWeights(server, network): print ('Fetching and Verifying Network ({0})'.format(network)) fname = pathjoin('Networks', network).rstrip('/') if not os.path.isfile(fname): - getFile('{}/networks/download/{}'.format(server, network), fname) + getFile(pathjoin(server, 'networks', 'download', network), fname) with open(fname, 'rb') as weights: sha256 = hashlib.sha256(weights.read()).hexdigest()[:8].upper() diff --git a/OpenBench/urls.py b/OpenBench/urls.py index 1a9fd3b..d1503f7 100644 --- a/OpenBench/urls.py +++ b/OpenBench/urls.py @@ -53,6 +53,7 @@ urlpatterns = [ django.urls.path(r'networks/', OpenBench.views.networks), django.urls.path(r'networks//', OpenBench.views.networks), django.urls.path(r'networks//', OpenBench.views.networks), + django.urls.path(r'networks///', OpenBench.views.networks), # Links for the Client to work with the Server django.urls.path(r'clientGetFiles/', OpenBench.views.clientGetFiles),