question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

file_name appending '&noauth=true' to variable

See original GitHub issue

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 added file_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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
freehussaincommented, Jan 17, 2017

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

1reaction
krajstercommented, Jan 12, 2017

Hi, may be using this code: file_name = re.match(r’^.*?.zip’, file_name).group(0)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Append to variable filename in Bash - Stack Overflow
I have tried it in ${} , $() , "" . Is this not an escaping issue? bash · zsh.
Read more >
bash - Appending a current date from a variable to a filename
Execute the date command, passing in the Y, m, d, H, M, S flags to configure the output. Place the result into the...
Read more >
[HELP] Appending dta files and generatinig filename variable
However I want to add a variable that reflects the original filename of the source. I know this can be done with the...
Read more >
How to insert a variable into filename - Academy Feedback
Right now i have a variable(vfilename) with the current date and time as value. How can i append the pdf file name with...
Read more >
Dynamically append text to filenames in Bash - Super User
This is because the ${file} variable contains the filename including the extension. I'm running Cygwin on top of Windows. I'm not sure how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found