diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-11-26 00:23:01 +0000 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-06-11 20:49:46 +0100 |
commit | 140065b5804d945ec528dc45eb53848f14d60b5f (patch) | |
tree | c247dc2360b147a0524889775e803a2ad036c786 /poezio/common.py | |
parent | d0df65ba7b63f0e1661329a4664984e23c2b631f (diff) | |
download | poezio-140065b5804d945ec528dc45eb53848f14d60b5f.tar.gz poezio-140065b5804d945ec528dc45eb53848f14d60b5f.tar.bz2 poezio-140065b5804d945ec528dc45eb53848f14d60b5f.tar.xz poezio-140065b5804d945ec528dc45eb53848f14d60b5f.zip |
Make poezio.poezio_shlex more Cython-friendly.
Diffstat (limited to 'poezio/common.py')
-rw-r--r-- | poezio/common.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/poezio/common.py b/poezio/common.py index a62c83f1..30a12daa 100644 --- a/poezio/common.py +++ b/poezio/common.py @@ -12,6 +12,7 @@ Various useful functions. from sys import version_info from datetime import datetime, timedelta from slixmpp import JID, InvalidJID +from poezio_shlex import shlex import base64 import os @@ -20,7 +21,6 @@ import hashlib import subprocess import time import string -import poezio_shlex as shlex # Needed to avoid datetime.datetime.timestamp() @@ -294,7 +294,7 @@ def shell_split(st): >>> shell_split('"sdf 1" "toto 2"') ['sdf 1', 'toto 2'] """ - sh = shlex.shlex(st) + sh = shlex(st) ret = [] w = sh.get_token() while w and w[2] is not None: @@ -329,7 +329,7 @@ def find_argument_quoted(pos, text): Get the number of the argument at position pos in a string with possibly quoted text. """ - sh = shlex.shlex(text) + sh = shlex(text) count = -1 w = sh.get_token() while w and w[2] is not None: |