Skip to content

Changed plus operator to os.path.join()#16240

Merged
alalek merged 2 commits intoopencv:3.4from
archsyscall:olramde
Jan 10, 2020
Merged

Changed plus operator to os.path.join()#16240
alalek merged 2 commits intoopencv:3.4from
archsyscall:olramde

Conversation

@archsyscall
Copy link
Copy Markdown
Contributor

When dealing with PATH, it is not recommended to use the plus operator (+). So, I used os.path.join().

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Please try to run tests locally (see build CI step logs).

class qrcode_detector_test(NewOpenCVTests):
def test_detect_and_decode(self):
img = cv.imread(self.extraTestDataPath + '/cv/qrcode/link_ocv.jpg')
img = cv.imread(os.path.join(self.extraTestDataPath, '/cv/qrcode/link_ocv.jpg'))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would suggest removing slash too (there is no absolute path):

'/cv/
'cv/

Also it would be nice to check that input data is read properly (img != None)

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 28, 2019

This patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly).

So, please:

  • change "base" branch of this PR: master => 3.4 (use "Edit" button near PR title)
  • rebase your commits from master onto 3.4 branch. For example:
    git rebase -i --onto upstream/3.4 upstream/master
    (check list of your commits, save and quit (Esc + "wq" + Enter)
    where upstream is configured by following this GitHub guide and fetched (git fetch upstream).
  • push rebased commits into source branch of your fork (with --force option)

Note: no needs to re-open PR, apply changes "inplace".

@archsyscall archsyscall changed the base branch from master to 3.4 December 30, 2019 01:56
@archsyscall
Copy link
Copy Markdown
Contributor Author

@alalek
Thank you. Can you give me more details on what I should do?

@alalek
Copy link
Copy Markdown
Member

alalek commented Dec 31, 2019

I provided detailed instructions above.

Merge branch '3.4' into olramde

There is no "merge" step.


I can take a look on this later.

@alalek alalek merged commit c75d933 into opencv:3.4 Jan 10, 2020
@alalek alalek mentioned this pull request Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants