plugin mr mercurial, tools(common/utils): moved command protocol to a new module
This commit is contained in:
parent
687ef5b6bd
commit
8a59034935
1 changed files with 181 additions and 62 deletions
|
|
@ -21,12 +21,7 @@
|
|||
|
||||
import unicodedata
|
||||
import os.path
|
||||
from sat.core.constants import Const as C
|
||||
from sat.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
import datetime
|
||||
from twisted.python import procutils
|
||||
import subprocess
|
||||
import time
|
||||
import sys
|
||||
|
|
@ -34,6 +29,11 @@ import random
|
|||
import inspect
|
||||
import textwrap
|
||||
import functools
|
||||
from twisted.python import procutils
|
||||
from sat.core.constants import Const as C
|
||||
from sat.core.log import getLogger
|
||||
|
||||
log = getLogger(__name__)
|
||||
|
||||
|
||||
NO_REPOS_DATA = u"repository data unknown"
|
||||
|
|
@ -56,6 +56,12 @@ def clean_ustr(ustr):
|
|||
return "".join(valid_chars(ustr))
|
||||
|
||||
|
||||
def logError(failure_):
|
||||
"""Genertic errback which log the error as a warning, and re-raise it"""
|
||||
log.warning(failure_.value)
|
||||
raise failure_
|
||||
|
||||
|
||||
def partial(func, *fixed_args, **fixed_kwargs):
|
||||
# FIXME: temporary hack to workaround the fact that inspect.getargspec is not working with functools.partial
|
||||
# making partial unusable with current D-bus module (in addMethod).
|
||||
|
|
|
|||
Loading…
Reference in a new issue