text stringlengths 81 112k |
|---|
Fetch the data from hddtemp daemon.
def fetch(self):
"""Fetch the data from hddtemp daemon."""
# Taking care of sudden deaths/stops of hddtemp daemon
try:
sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sck.connect((self.host, self.port))
data = b''
... |
:param prekeyIds:
:type prekeyIds: list
:return:
:rtype:
def set_prekeys_as_sent(self, prekeyIds):
"""
:param prekeyIds:
:type prekeyIds: list
:return:
:rtype:
"""
logger.debug("set_prekeys_as_sent(prekeyIds=[%d prekeyIds])" % len(prekeyId... |
:param recipient_id:
:type recipient_id: str
:param data:
:type data: bytes
:return:
:rtype:
def encrypt(self, recipient_id, message):
logger.debug("encrypt(recipientid=%s, message=%s)" % (recipient_id, message))
"""
:param recipient_id:
:type rec... |
:param groupid:
:type groupid: str
:param message:
:type message: bytes
:return:
:rtype:
def group_encrypt(self, groupid, message):
"""
:param groupid:
:type groupid: str
:param message:
:type message: bytes
:return:
:rtype... |
:param groupid:
:type groupid: str
:param participantid:
:type participantid: str
:param skmsgdata:
:type skmsgdata: bytearray
:return:
:rtype:
def group_create_session(self, groupid, participantid, skmsgdata):
"""
:param groupid:
:type gr... |
:param username:
:type username: str
:param prekeybundle:
:type prekeybundle: PreKeyBundle
:return:
:rtype:
def create_session(self, username, prekeybundle, autotrust=False):
"""
:param username:
:type username: str
:param prekeybundle:
:t... |
:param username:
:type username: str
:return:
:rtype:
def session_exists(self, username):
"""
:param username:
:type username: str
:return:
:rtype:
"""
logger.debug("session_exists(%s)?" % username)
return self._store.containsSessi... |
:param data:
:type data: dict
:return:
:rtype: dict
def transform(self, data):
"""
:param data:
:type data: dict
:return:
:rtype: dict
"""
out = {}
for key, val in data.items():
if key in self._transform_map:
... |
:param username:
:type username:
:return:
:rtype:
def load(self, username):
"""
:param username:
:type username:
:return:
:rtype:
"""
config_dir = StorageTools.getStorageForPhone(username)
logger.debug("Detecting config for usernam... |
:param type:
:type type: int
:return:
:rtype:
def _type_to_str(self, type):
"""
:param type:
:type type: int
:return:
:rtype:
"""
for key, val in self.TYPE_NAMES.items():
if key == type:
return val |
:param path:
:type path:
:return:
:rtype:
def load_path(self, path):
"""
:param path:
:type path:
:return:
:rtype:
"""
logger.debug("load_path(path=%s)" % path)
if os.path.isfile(path):
configtype = self.guess_type(path... |
:type protocolTreeNode: ProtocolTreeNode
def receive(self, protocolTreeNode):
"""
:type protocolTreeNode: ProtocolTreeNode
"""
if not self.processIqRegistry(protocolTreeNode):
if protocolTreeNode.tag == "notification" and protocolTreeNode["type"] == "encrypt":
... |
sends prekeys
:return:
:rtype:
def flush_keys(self, signed_prekey, prekeys, reboot_connection=False):
"""
sends prekeys
:return:
:rtype:
"""
preKeysDict = {}
for prekey in prekeys:
keyPair = prekey.getKeyPair()
preKeysDict[... |
:param layer: An optional layer to put on top of default stack
:param axolotl: E2E encryption enabled/ disabled
:return: YowStack
def getDefaultStack(layer = None, axolotl = False, groups = True, media = True, privacy = True, profiles = True):
"""
:param layer: An optional layer to put ... |
:type entity: IqProtocolEntity
def processIqRegistry(self, entity):
"""
:type entity: IqProtocolEntity
"""
if entity.getTag() == "iq":
iq_id = entity.getId()
if iq_id in self.iqRegistry:
originalIq, successClbk, errorClbk = self.iqRegistry[iq_id]
... |
:param data:
:type data: dict
:return:
:rtype:
def transform(self, data):
"""
:param data:
:type data: dict
:return:
:rtype:
"""
out=[]
keys = sorted(data.keys())
for k in keys:
out.append("%s=%s" % (k, data[k])... |
:param config:
:type config: yowsup.config.base.config.Config
:return:
:rtype: bytes
def serialize(self, config):
"""
:param config:
:type config: yowsup.config.base.config.Config
:return:
:rtype: bytes
"""
for transform in self._transform... |
:type cls: type
:param data:
:type data: bytes
:return:
:rtype: yowsup.config.base.config.Config
def deserialize(self, data):
"""
:type cls: type
:param data:
:type data: bytes
:return:
:rtype: yowsup.config.base.config.Config
"""
... |
:type senderKeyName: SenderKeName
:type senderKeyRecord: SenderKeyRecord
def storeSenderKey(self, senderKeyName, senderKeyRecord):
"""
:type senderKeyName: SenderKeName
:type senderKeyRecord: SenderKeyRecord
"""
q = "INSERT INTO sender_keys (group_id, sender_id, record) ... |
:type senderKeyName: SenderKeyName
def loadSenderKey(self, senderKeyName):
"""
:type senderKeyName: SenderKeyName
"""
q = "SELECT record FROM sender_keys WHERE group_id = ? and sender_id = ?"
cursor = self.dbConn.cursor()
cursor.execute(q, (senderKeyName.getGroupId(), se... |
:type entity: IqProtocolEntity
def sendIq(self, entity):
"""
:type entity: IqProtocolEntity
"""
if entity.getType() == IqProtocolEntity.TYPE_SET and entity.getXmlns() == "w:m":
#media upload!
self._sendIq(entity, self.onRequestUploadSuccess, self.onRequestUploadE... |
:type protocolTreeNode: ProtocolTreeNode
def receive(self, protocolTreeNode):
"""
:type protocolTreeNode: ProtocolTreeNode
"""
if not self.processIqRegistry(protocolTreeNode):
if protocolTreeNode.tag == "message":
self.onMessage(protocolTreeNode)
... |
:param data:
:type data: bytearray | bytes
:return:
:rtype:
def send(self, data):
"""
:param data:
:type data: bytearray | bytes
:return:
:rtype:
"""
data = bytes(data) if type(data) is not bytes else data
self._wa_noiseprotocol.se... |
:param data:
:type data: bytes
:return:
:rtype:
def receive(self, data):
"""
:param data:
:type data: bytes
:return:
:rtype:
"""
self._incoming_segments_queue.put(data)
if not self._in_handshake():
self._flush_incoming_... |
:rtype: YowsupEnv
def getCurrent(cls):
"""
:rtype: YowsupEnv
"""
if cls.__CURR is None:
env = DEFAULT
envs = cls.getRegisteredEnvs()
if env not in envs:
env = envs[0]
logger.debug("Env not set, setting it to %s" % env)
... |
:param params:
:type params: list
:param key:
:type key: ECPublicKey
:return:
:rtype: list
def encryptParams(self, params, key):
"""
:param params:
:type params: list
:param key:
:type key: ECPublicKey
:return:
:rtype: list... |
:param preKeyIds:
:type preKeyIds: list
:return:
:rtype:
def setAsSent(self, prekeyIds):
"""
:param preKeyIds:
:type preKeyIds: list
:return:
:rtype:
"""
for prekeyId in prekeyIds:
q = "UPDATE prekeys SET sent_to_server = ? WHE... |
:param config:
:type config: dict
:return:
:rtype: yowsup.config.config.Config
def transform(self, config):
"""
:param config:
:type config: dict
:return:
:rtype: yowsup.config.config.Config
"""
out = {}
for prop in vars(config):
... |
Show system notification with duration t (ms)
def notify(msg, msg_type=0, t=None):
msg = msg.replace('"', '\\"')
"Show system notification with duration t (ms)"
if platform.system() == "Darwin":
command = notify_command_osx(msg, msg_type, t)
else:
command = notify_command_linux(msg, t)
... |
Runs the given args in subprocess.Popen, and then calls the function
on_exit when the subprocess completes.
on_exit is a callable object, and args is a lists/tuple of args
that would give to subprocess.Popen.
def start_playing(self, on_exit, args):
"""
Runs the given args in sub... |
Expand a string containing $vars as Ninja would.
Note: doesn't handle the full Ninja variable syntax, but it's enough
to make configure.py's use of it work.
def expand(string, vars, local_vars={}):
"""Expand a string containing $vars as Ninja would.
Note: doesn't handle the full Ninja variable syntax... |
Returns the number of '$' characters right in front of s[i].
def _count_dollars_before_index(self, s, i):
"""Returns the number of '$' characters right in front of s[i]."""
dollar_count = 0
dollar_index = i - 1
while dollar_index > 0 and s[dollar_index] == '$':
dollar_count ... |
Write 'text' word-wrapped at self.width characters.
def _line(self, text, indent=0):
"""Write 'text' word-wrapped at self.width characters."""
leading_space = ' ' * indent
while len(leading_space) + len(text) > self.width:
# The text is too wide; wrap if possible.
# Fi... |
Expand $vars in an array of paths, e.g. from a 'build' block.
def _expand_paths(self, paths):
"""Expand $vars in an array of paths, e.g. from a 'build' block."""
paths = ninja_syntax.as_list(paths)
return ' '.join(map(self._shell_escape, (map(self._expand, paths)))) |
Expand $vars in a string.
def _expand(self, str, local_vars={}):
"""Expand $vars in a string."""
return ninja_syntax.expand(str, self.vars, local_vars) |
Run a subcommand, quietly. Prints the full command on error.
def _run_command(self, cmdline):
"""Run a subcommand, quietly. Prints the full command on error."""
try:
if self.verbose:
print(cmdline)
subprocess.check_call(cmdline, shell=True)
except subpr... |
Returns a random integer that's avg on average, following a power law.
alpha determines the shape of the power curve. alpha has to be larger
than 1. The closer alpha is to 1, the higher the variation of the returned
numbers.
def paretoint(avg, alpha):
"""Returns a random integer that's avg on average, ... |
Writes master build.ninja file, referencing all given subninjas.
def write_master_ninja(master_ninja, targets):
"""Writes master build.ninja file, referencing all given subninjas."""
master_ninja.variable('cxx', 'c++')
master_ninja.variable('ld', '$cxx')
if sys.platform == 'darwin':
master_ninj... |
Context manager for a ninja_syntax object writing to a file.
def FileWriter(path):
"""Context manager for a ninja_syntax object writing to a file."""
try:
os.makedirs(os.path.dirname(path))
except OSError:
pass
f = open(path, 'w')
yield ninja_syntax.Writer(f)
f.close() |
Load the server extension.
def load_jupyter_server_extension(nbapp):
"""Load the server extension.
"""
here = PACKAGE_DIR
nbapp.log.info('nteract extension loaded from %s' % here)
app_dir = here # bundle is part of the python package
web_app = nbapp.web_app
config = NteractConfig(parent=... |
Add the appropriate handlers to the web app.
def add_handlers(web_app, config):
"""Add the appropriate handlers to the web app.
"""
base_url = web_app.settings['base_url']
url = ujoin(base_url, config.page_url)
assets_dir = config.assets_dir
package_file = os.path.join(assets_dir, 'package.jso... |
if (!(this instanceof SemVer))
return new SemVer(version, loose);
def semver(version, loose):
if isinstance(version, SemVer):
if version.loose == loose:
return version
else:
version = version.version
elif not isinstance(version, string_type): # xxx:
raise... |
read the lines from a file into a list
def get_list_from_file(file_name):
"""read the lines from a file into a list"""
with open(file_name, mode='r', encoding='utf-8') as f1:
lst = f1.readlines()
return lst |
append a line of text to a file
def append_to_file(file_name, line_data):
"""append a line of text to a file"""
with open(file_name, mode='a', encoding='utf-8') as f1:
f1.write(line_data)
f1.write("\n") |
Determine if input contains negation words
def negated(input_words, include_nt=True):
"""
Determine if input contains negation words
"""
input_words = [str(w).lower() for w in input_words]
neg_words = []
neg_words.extend(NEGATE)
for word in neg_words:
if word in input_words:
... |
Normalize the score to be between -1 and 1 using an alpha that
approximates the max expected value
def normalize(score, alpha=15):
"""
Normalize the score to be between -1 and 1 using an alpha that
approximates the max expected value
"""
norm_score = score / math.sqrt((score * score) + alpha)
... |
Check whether just some words in the input are ALL CAPS
:param list words: The words to inspect
:returns: `True` if some but not all items in `words` are ALL CAPS
def allcap_differential(words):
"""
Check whether just some words in the input are ALL CAPS
:param list words: The words to inspect
... |
Check if the preceding words increase, decrease, or negate/nullify the
valence
def scalar_inc_dec(word, valence, is_cap_diff):
"""
Check if the preceding words increase, decrease, or negate/nullify the
valence
"""
scalar = 0.0
word_lower = word.lower()
if word_lower in BOOSTER_DICT:
... |
Returns mapping of form:
{
'cat,': 'cat',
',cat': 'cat',
}
def _words_plus_punc(self):
"""
Returns mapping of form:
{
'cat,': 'cat',
',cat': 'cat',
}
"""
no_punc_text = REGEX_REMOVE_PUNCTUATION.sub('', self.... |
Removes leading and trailing puncutation
Leaves contractions and most emoticons
Does not preserve punc-plus-letter emoticons (e.g. :D)
def _words_and_emoticons(self):
"""
Removes leading and trailing puncutation
Leaves contractions and most emoticons
Does not pre... |
Convert lexicon file to a dictionary
def make_lex_dict(self):
"""
Convert lexicon file to a dictionary
"""
lex_dict = {}
for line in self.lexicon_full_filepath.split('\n'):
(word, measure) = line.strip().split('\t')[0:2]
lex_dict[word] = float(measure)
... |
Convert emoji lexicon file to a dictionary
def make_emoji_dict(self):
"""
Convert emoji lexicon file to a dictionary
"""
emoji_dict = {}
for line in self.emoji_full_filepath.split('\n'):
(emoji, description) = line.strip().split('\t')[0:2]
emoji_dict[emoj... |
Return a float for sentiment strength based on the input text.
Positive values are positive valence, negative value are negative
valence.
def polarity_scores(self, text):
"""
Return a float for sentiment strength based on the input text.
Positive values are positive valence, neg... |
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.path.join(HERE, *parts), "r... |
Parse messages sent by the 'buildbot-cvs-mail' program.
def parse(self, m, prefix=None):
"""Parse messages sent by the 'buildbot-cvs-mail' program.
"""
# The mail is sent from the person doing the checkin. Assume that the
# local username is enough to identify them (this assumes a one-s... |
Parse messages sent by the svn 'commit-email.pl' trigger.
def parse(self, m, prefix=None):
"""Parse messages sent by the svn 'commit-email.pl' trigger.
"""
# The mail is sent from the person doing the checkin. Assume that the
# local username is enough to identify them (this assumes a ... |
Parse branch notification messages sent by Launchpad.
def parse(self, m, prefix=None):
"""Parse branch notification messages sent by Launchpad.
"""
subject = m["subject"]
match = re.search(r"^\s*\[Branch\s+([^]]+)\]", subject)
if match:
repository = match.group(1)
... |
Called from remote worker to write L{data} to L{fp} within boundaries
of L{maxsize}
@type data: C{string}
@param data: String of data to write
def remote_write(self, data):
"""
Called from remote worker to write L{data} to L{fp} within boundaries
of L{maxsize}
... |
Called by remote worker to state that no more data will be transferred
def remote_close(self):
"""
Called by remote worker to state that no more data will be transferred
"""
self.fp.close()
self.fp = None
# on windows, os.rename does not automatically unlink, so do it
... |
Called by remote worker to state that no more data will be transferred
def remote_unpack(self):
"""
Called by remote worker to state that no more data will be transferred
"""
# Make sure remote_close is called, otherwise atomic rename won't happen
self.remote_close()
# ... |
Called from remote worker to read at most L{maxlength} bytes of data
@type maxlength: C{integer}
@param maxlength: Maximum number of data bytes that can be returned
@return: Data read from L{fp}
@rtype: C{string} of bytes read from file
def remote_read(self, maxlength):
"""
... |
run CMake
def run(self):
"""
run CMake
"""
command = [self.cmake]
if self.generator:
command.extend([
'-G', self.generator
])
if self.path:
command.append(self.path)
if self.definitions is not None:
... |
I am called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.sendUpdate} so
I can receive updates from the running remote command.
@type updates: list of [object, int]
@param updates: list of updates from the remote command
def remote_update(self, updates):
"""
... |
Called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.commandComplete} to
notify me the remote command has finished.
@type failure: L{twisted.python.failure.Failure} or None
@rtype: None
def remote_complete(self, failure=None):
"""
Called by the worker's
... |
The hasattr equivalent for attribute groups: returns whether the given
member is in the attribute group.
def _hasAttrGroupMember(self, attrGroup, attr):
"""
The hasattr equivalent for attribute groups: returns whether the given
member is in the attribute group.
"""
metho... |
The getattr equivalent for attribute groups: gets and returns the
attribute group member.
def _getAttrGroupMember(self, attrGroup, attr):
"""
The getattr equivalent for attribute groups: gets and returns the
attribute group member.
"""
method_name = '%s_%s' % (attrGroup,... |
Returns a list of all members in the attribute group.
def _listAttrGroupMembers(self, attrGroup):
"""
Returns a list of all members in the attribute group.
"""
from inspect import getmembers, ismethod
methods = getmembers(self, ismethod)
group_prefix = attrGroup + '_'
... |
Update a property, indexing the property by codebase if codebase is not
''. Source steps should generally use this instead of setProperty.
def updateSourceProperty(self, name, value, source=''):
"""
Update a property, indexing the property by codebase if codebase is not
''. Source ste... |
Convert Gerrit account properties to Buildbot format
Take into account missing values
def _gerrit_user_to_author(props, username="unknown"):
"""
Convert Gerrit account properties to Buildbot format
Take into account missing values
"""
username = props.get("username", username)
username = ... |
This method finds the first parent class which is within the buildbot namespace
it prepends the name with as many ">" as the class is subclassed
def getName(obj):
"""This method finds the first parent class which is within the buildbot namespace
it prepends the name with as many ">" as the class is subclas... |
Send the actual configuration of the builders, how the steps are agenced.
Note that full data will never send actual detail of what command is run, name of servers, etc.
def fullData(master):
"""
Send the actual configuration of the builders, how the steps are agenced.
Note that full data w... |
Generate a pair of (directory, file-list) for installation.
'd' -- A directory
'e' -- A glob pattern
def include(d, e):
"""Generate a pair of (directory, file-list) for installation.
'd' -- A directory
'e' -- A glob pattern"""
return (d, [f for f in glob.glob('%s/%s' % (d, e)) if os.path.isf... |
helper to produce lines suitable for setup.py's entry_points
def define_plugin_entry(name, module_name):
"""
helper to produce lines suitable for setup.py's entry_points
"""
if isinstance(name, tuple):
entry, name = name
else:
entry = name
return '%s = %s:%s' % (entry, module_na... |
helper to all groups for plugins
def define_plugin_entries(groups):
"""
helper to all groups for plugins
"""
result = dict()
for group, modules in groups:
tempo = []
for module_name, names in modules:
tempo.extend([define_plugin_entry(name, module_name)
... |
Static method to create a filter based on constructor args
change_filter, branch, and categories; use default values @code{None},
@code{NotABranch}, and @code{None}, respectively. These arguments are
interpreted as documented for the
L{buildbot.schedulers.basic.Scheduler} class.
... |
Read changes since last change.
- Read list of commit hashes.
- Extract details from each commit.
- Add changes to database.
def _process_changes(self, newRev, branch):
"""
Read changes since last change.
- Read list of commit hashes.
- Extract details from eac... |
Shut down the entire process, once all currently-running builds are
complete.
quickMode will mark all builds as retry (except the ones that were triggered)
def cleanShutdown(self, quickMode=False, stopReactor=True, _reactor=reactor):
"""Shut down the entire process, once all currently-running b... |
Convert a Lock identifier into an actual Lock instance.
@param lockid: a locks.MasterLock or locks.WorkerLock instance
@return: a locks.RealMasterLock or locks.RealWorkerLock instance
def getLockByID(self, lockid):
"""Convert a Lock identifier into an actual Lock instance.
@param lockid... |
Call this when something suggests that a particular worker may now be
available to start a build.
@param worker_name: the name of the worker
def maybeStartBuildsForWorker(self, worker_name):
"""
Call this when something suggests that a particular worker may now be
available to ... |
Rewrap text for output to the console.
Removes common indentation and rewraps paragraphs according to the console
width.
Line feeds between paragraphs preserved.
Formatting of paragraphs that starts with additional indentation
preserved.
def rewrap(text, width=None):
"""
Rewrap text for o... |
Consumes a naive build notification (the default for now)
basically, set POST variables to match commit object parameters:
revision, revlink, comments, branch, who, files, links
files, links and properties will be de-json'd, the rest are interpreted as strings
def getChanges(self, request):
... |
Create and return a L{BBRefTargetDirective} subclass.
def make_ref_target_directive(ref_type, indextemplates=None, **kwargs):
"""
Create and return a L{BBRefTargetDirective} subclass.
"""
class_vars = dict(ref_type=ref_type, indextemplates=indextemplates)
class_vars.update(kwargs)
return type("... |
Create and return a L{BBIndex} subclass, for use in the domain's C{indices}
def make_index(name, localname):
"""
Create and return a L{BBIndex} subclass, for use in the domain's C{indices}
"""
return type("BB%sIndex" % (name.capitalize(),),
(BBIndex,),
dict(name=name, lo... |
Resolve a reference to a directive of this class
def resolve_ref(cls, domain, env, fromdocname, builder, typ, target, node,
contnode):
"""
Resolve a reference to a directive of this class
"""
targets = domain.data['targets'].get(cls.ref_type, {})
try:
... |
Resolve a reference to an index to the document containing the index,
using the index's C{localname} as the content of the link.
def resolve_ref(cls, domain, env, fromdocname, builder, typ, target, node,
contnode):
"""
Resolve a reference to an index to the document containi... |
call this function after the file exists to populate properties
def load(self):
"""
call this function after the file exists to populate properties
"""
# If we are given a string, open it up else assume it's something we
# can call read on.
if isinstance(self.specfile, s... |
Consumer for this (CaptureProperty) class. Gets the properties from data api and
send them to the storage backends.
def consume(self, routingKey, msg):
"""
Consumer for this (CaptureProperty) class. Gets the properties from data api and
send them to the storage backends.
"""
... |
Consumer for CaptureBuildStartTime. Gets the build start time.
def consume(self, routingKey, msg):
"""
Consumer for CaptureBuildStartTime. Gets the build start time.
"""
builder_info = yield self.master.data.get(("builders", msg['builderid']))
if self._builder_name_matches(build... |
Consumer for this (CaptureData) class. Gets the data sent from yieldMetricsValue and
sends it to the storage backends.
def consume(self, routingKey, msg):
"""
Consumer for this (CaptureData) class. Gets the data sent from yieldMetricsValue and
sends it to the storage backends.
"... |
:param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param sha: Full sha to create the status for.
:param state: one of the following 'pending', 'success', 'error'
or 'failure'.
:param target_url: Target url to associate with this ... |
:param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param issue: Pull request number
:param state: one of the following 'pending', 'success', 'error'
or 'failure'.
:param description: Short description of the status.
:retu... |
Stop worker process by sending it a signal.
Using the specified basedir path, read worker process's pid file and
try to terminate that process with specified signal.
@param basedir: worker's basedir path
@param quite: if False, don't print any messages to stdout
@param signame: signal to send to... |
Create a new Build instance.
@param requests: a list of buildrequest dictionaries describing what is
to be built
def newBuild(self, requests):
"""Create a new Build instance.
@param requests: a list of buildrequest dictionaries describing what is
to be built
"""
... |
This method can be used to add patters of warnings that should
not be counted.
It takes a single argument, a list of patterns.
Each pattern is a 4-tuple (FILE-RE, WARN-RE, START, END).
FILE-RE is a regular expression (string or compiled regexp), or None.
If None, the pattern m... |
Extract file name, line number, and warning text as groups (1,2,3)
of warningPattern match.
def warnExtractFromRegexpGroups(self, line, match):
"""
Extract file name, line number, and warning text as groups (1,2,3)
of warningPattern match."""
file = match.group(1)
lineNo... |
Match log lines against warningPattern.
Warnings are collected into another log for this step, and the
build-wide 'warnings-count' is updated.
def createSummary(self, log):
"""
Match log lines against warningPattern.
Warnings are collected into another log for this step, and t... |
cppcheck always return 0, unless a special parameter is given
def evaluateCommand(self, cmd):
""" cppcheck always return 0, unless a special parameter is given """
for msg in self.flunkingIssues:
if self.counts[msg] != 0:
return FAILURE
if self.getProperty('cppcheck-... |
get the value from pass identified by 'entry'
def get(self, entry):
"""
get the value from pass identified by 'entry'
"""
try:
output = yield utils.getProcessOutput(
"pass",
args=[entry],
env=self._env
)
... |
Patch startService and stopService so that they check the previous state
first.
(used for debugging only)
def patch():
"""
Patch startService and stopService so that they check the previous state
first.
(used for debugging only)
"""
from twisted.application.service import Service
... |
Perform any periodic database cleanup tasks.
@returns: Deferred
def _doCleanup(self):
"""
Perform any periodic database cleanup tasks.
@returns: Deferred
"""
# pass on this if we're not configured yet
if not self.configured_url:
return
d = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.