From 140065b5804d945ec528dc45eb53848f14d60b5f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 26 Nov 2015 00:23:01 +0000 Subject: Make poezio.poezio_shlex more Cython-friendly. --- poezio/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'poezio/common.py') 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: -- cgit v1.2.3