Remove compat.py

- There is only one string type in python3
- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2019-12-10 21:39:22 +01:00
parent c7e044373f
commit c27344525b
2 changed files with 1 additions and 11 deletions

View file

@ -1,9 +0,0 @@
# -*- coding: utf-8 -*-
try:
STRING_TYPE = basestring
except NameError:
# Python 3
STRING_TYPE = str
# vim: ai sts=4 et sw=4

View file

@ -7,7 +7,6 @@ import shutil
import tempfile
import unittest
from .compat import STRING_TYPE
from .exceptions import CommandError
from .utils import run_cmd_wait, run_cmd_wait_nofail, which, timew_binary_location, DEFAULT_EXTENSION_PATH
@ -148,7 +147,7 @@ class Timew(object):
argument. The string is literally the same as if written in the shell.
"""
# Enable nicer-looking calls by allowing plain strings
if isinstance(args, STRING_TYPE):
if isinstance(args, str):
args = shlex.split(args)
return args