Skip to content

Commit 81bbdc9

Browse files
authored
try to handle versioning on openbsd (#32)
1 parent 0102663 commit 81bbdc9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libtmux/common.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import logging
1010
import os
1111
import re
12+
import sys
1213
import subprocess
1314
from distutils.version import StrictVersion, LooseVersion
1415

@@ -380,6 +381,12 @@ def is_version(version):
380381
:rtype: bool
381382
382383
"""
384+
if sys.platform.startswith("openbsd"):
385+
if LooseVersion(version) > LooseVersion('2.1'):
386+
return 'openbsd'
387+
else:
388+
return False
389+
383390
proc = tmux_cmd('-V')
384391

385392
if proc.stderr:
@@ -401,6 +408,9 @@ def has_required_tmux_version(version=None):
401408
"""
402409

403410
if not version:
411+
if sys.platform.startswith("openbsd"): # openbsd has no tmux -V
412+
return '2.3'
413+
404414
proc = tmux_cmd('-V')
405415

406416
if proc.stderr:

0 commit comments

Comments
 (0)