10000 add splitlines · Python3pkg/opencv-python@085522b · GitHub
[go: up one dir, main page]

Skip to content

Commit 085522b

Browse files
committed
add splitlines
1 parent a374147 commit 085522b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

find_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
break
2424

2525
# used in local dev releases
26-
git_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode()
26+
git_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).splitlines()[0].decode()
2727

2828
if os.name == 'posix':
2929
version = os.getenv('TRAVIS_TAG', git_hash)
@@ -40,4 +40,4 @@
4040
print("Version: ", opencv_version)
4141

4242
with open('cv_version.py', 'w') as f:
43-
f.write('opencv_version = "%s"' % opencv_version)
43+
f.write('opencv_version = "{}"'.format(opencv_version))

0 commit comments

Comments
 (0)
0