X Tutup
Skip to content

add per_page config option#505

Merged
gpocentek merged 1 commit intopython-gitlab:masterfrom
jouve:config_per_page
May 26, 2018
Merged

add per_page config option#505
gpocentek merged 1 commit intopython-gitlab:masterfrom
jouve:config_per_page

Conversation

@jouve
Copy link
Contributor

@jouve jouve commented May 21, 2018

Close #503 .

side_effect=lambda: fd.seek(0))
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.

side_effect=lambda: fd.seek(0))
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.

2 participants

X Tutup