Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added handling of 'UNKNOWN' URL when package has no sources. #75

Merged
merged 2 commits into from
Aug 18, 2016

Conversation

frenzymadness
Copy link
Member

No description provided.

@hroncok
Copy link
Member

hroncok commented Aug 15, 2016

Reference #70 in the commit message?

@frenzymadness
Copy link
Member Author

Yes, I forget to mention related issue in commit message but I can close it manually after merge.

@mcyprian
Copy link
Member

The only thing that is changed by this fix is that 'PACKAGE WITHOUT SOURCES' appears at the end of Traceback instead of 'UNKNOWN'. It is not possible to generate the spec file without package sources. I suggest writing error message to stderr instead of log and raising SystemExit in both cases - url is None or set to 'UNKNOWN'.

@frenzymadness
Copy link
Member Author

Ok, I am gonna rearrange this part.

What is preferred way to print to stderr? I prefer to use print("error", file=sys.stderr) but this brings dependency on future module for Python2. Another possibility is to use only sys.stderr.write("error\n").

@mcyprian
Copy link
Member

The second option is used in pyp2rpm's sources several times already, so keep it consistent please.

New parametrized test for test exceptions in get_url function.
@frenzymadness
Copy link
Member Author

I've made some changes as you suggested. Also, I created new parametrized test for testing exceptions in get_url function.

@mcyprian mcyprian merged commit ec2c9d4 into fedora-python:master Aug 18, 2016
@frenzymadness frenzymadness deleted the fix_unknown_url_handling branch August 18, 2016 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants