Skip to content

Commit 066cfc0

Browse files
committed
meson: Remove unused sys import
1 parent 75fa3f2 commit 066cfc0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

build/meson/GetZstdLibraryVersion.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
# in the COPYING file in the root directory of this source tree).
99
# #############################################################################
1010
import re
11-
import sys
1211

1312

14-
def find_version(filepath):
13+
def find_version_tuple(filepath):
1514
version_file_data = None
1615
with open(filepath) as fd:
1716
version_file_data = fd.read()
@@ -24,17 +23,16 @@ def find_version(filepath):
2423
version_match = regex.search(version_file_data)
2524
if version_match:
2625
return version_match.groups()
27-
raise Exception("Unable to find version string.")
26+
raise Exception("Unable to find version string")
2827

2928

3029
def main():
3130
import argparse
3231
parser = argparse.ArgumentParser(description='Print zstd version from lib/zstd.h')
3332
parser.add_argument('file', help='path to lib/zstd.h')
3433
args = parser.parse_args()
35-
filepath = args.file
36-
version_tup = find_version(filepath)
37-
print('.'.join(version_tup))
34+
version_tuple = find_version_tuple(args.file)
35+
print('.'.join(version_tuple))
3836

3937

4038
if __name__ == '__main__':

0 commit comments

Comments
 (0)