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

add per_page config option #505

Merged
merged 1 commit into from
May 26, 2018
Merged

add per_page config option #505

merged 1 commit into from
May 26, 2018

Conversation

jouve
Copy link
Contributor

@jouve jouve commented May 21, 2018

Close #503 .

m_open.return_value = fd
config.GitlabConfigParser('one')
config.GitlabConfigParser('one')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this duplicated line is useful :) Could you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to test the change line#97.

Without the fd.seek(0), all calls to config.GitlabConfigParser fail except the 1st one:

# fd.tell() = 0
config.GitlabConfigParser('one')  # reads fd
# fd.tell() = end of file
config.GitlabConfigParser('one')  # reads nothing because fd is at end of file, so it fail

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for the explanation.

@gpocentek
Copy link
Contributor

LGTM, can you just drop the extra line (see comment). Thanks!

Copy link
Contributor Author

@jouve jouve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update the documentation before the merge.

m_open.return_value = fd
config.GitlabConfigParser('one')
config.GitlabConfigParser('one')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this to test the change line#97.

Without the fd.seek(0), all calls to config.GitlabConfigParser fail except the 1st one:

# fd.tell() = 0
config.GitlabConfigParser('one')  # reads fd
# fd.tell() = end of file
config.GitlabConfigParser('one')  # reads nothing because fd is at end of file, so it fail

@gpocentek gpocentek merged commit d981904 into python-gitlab:master May 26, 2018
@jouve jouve deleted the config_per_page branch June 7, 2018 21:13
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.

None yet

2 participants