Skip to content

Commit 2252d38

Browse files
committed
#34995: support debian version of tachyon
Debian patches tachyon so it won't report the version. We hardcode '0.99' since that's the version they ship.
1 parent 5734d2a commit 2252d38

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/sage/interfaces/tachyon.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,14 +865,17 @@ def version(self):
865865
866866
TESTS::
867867
868-
sage: tachyon_rt.version() # not tested
868+
sage: tachyon_rt.version() # random
869869
0.98.9
870870
sage: tachyon_rt.version() >= '0.98.9'
871871
True
872872
"""
873873
with os.popen('tachyon') as f:
874-
r = f.read()
875-
return re.search(r"Version ([\d.]*)", r)[1]
874+
r = f.readline()
875+
res = re.search(r"Version ([\d.]*)", r)
876+
# debian patches tachyon so it won't report the version
877+
# we hardcode '0.99' since that's indeed the version they ship
878+
return res[1] if res else '0.99'
876879

877880
def help(self, use_pager=True):
878881
"""

0 commit comments

Comments
 (0)