Closed j2clerck closed 7 years ago
Nice spot! I don't have any Xenserver boxes to hand at the moment, so welcome any patches in the meantime :D
I think this is a bug in general, it also happens on Xen Server 6.5
Hi, may be using this code: file_name = re.match(r'^.*?.zip', file_name).group(0)
hello,
i found a solution for this issue,
just add the following after (line 325) file_name = url.split('/')[-1]
the following file_name = file_name.split('&')[0]
kind regards
Nice one @freehussain, works here :)
I've thrown that into master branch without testing - can you confirm it's OK? Then i'll close :)
index c7c4620..2104406 100755
--- a/patcher.py
+++ b/patcher.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
#
# Citrix XenServer Patcher
-version = "1.5.2"
+version = "1.5.3"
# -- Designed to automatically review available patches from Citrix's XML API,
# compare with already installed patches, and apply as necessary- prompting the user
# to reboot/restart the XE ToolStack if necessary.
@@ -322,7 +322,7 @@ def login():
def download_patch(patch_url):
url = patch_url
- file_name = url.split('/')[-1]
+ file_name = url.split('/')[-1].split('&')[0]
print("")
print("Downloading: " + str(file_name))
try:
Works!! Thanks.
Hi,
I'm new to XenServer and this little utility is a beauty. On XenServer 7 there is a bug though at file_name var construction as the url contains "&noauth=true" at the end.
On line 325:
file_name = url.split('/')[-1]
I've addedfile_name = file_name('&')[0]
just thereafter but I think a more proper test should be coded. ex:if file_name.find('&')
file_name = file_name('&')[0]
Thanks again. Joseph.