mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
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:
parent
c7e044373f
commit
c27344525b
2 changed files with 1 additions and 11 deletions
|
@ -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
|
|
|
@ -7,7 +7,6 @@ import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from .compat import STRING_TYPE
|
|
||||||
from .exceptions import CommandError
|
from .exceptions import CommandError
|
||||||
from .utils import run_cmd_wait, run_cmd_wait_nofail, which, timew_binary_location, DEFAULT_EXTENSION_PATH
|
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.
|
argument. The string is literally the same as if written in the shell.
|
||||||
"""
|
"""
|
||||||
# Enable nicer-looking calls by allowing plain strings
|
# Enable nicer-looking calls by allowing plain strings
|
||||||
if isinstance(args, STRING_TYPE):
|
if isinstance(args, str):
|
||||||
args = shlex.split(args)
|
args = shlex.split(args)
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue