diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/phpDocumentor/Application/Console/Command/Phar/UpdateCommand.php b/src/phpDocumentor/Application/Console/Command/Phar/UpdateCommand.php
index <HASH>..<HASH> 100644
--- a/src/phpDocumentor/Application/Console/Command/Phar/UpdateCommand.php
+++ b/src/phpDocumentor/Application/Console/Command/Phar/UpdateCommand.php
@@ -30,6 +30,8 @@ use Symfony\Component\Console\Output\OutputInterface;
* ```
* $ php phpDocumentor.phar phar:update [-m|--major] [-p|--pre] [version]
* ```
+ *
+ * @codeCoverageIgnore file should be refactored first before it is testable and not high on prio listing
*/
class UpdateCommand extends Command
{
|
Do not cover UpdateCommand with tests for now
|
diff --git a/src/asynqp/connection.py b/src/asynqp/connection.py
index <HASH>..<HASH> 100644
--- a/src/asynqp/connection.py
+++ b/src/asynqp/connection.py
@@ -32,7 +32,6 @@ class Connection(object):
The :class:`~asyncio.Protocol` which is paired with the transport
"""
def __init__(self, loop, transport, protocol, synchroniser, sender, dispatcher, connection_info):
- self._loop = loop
self.synchroniser = synchroniser
self.sender = sender
self.channel_factory = channel.ChannelFactory(loop, protocol, dispatcher, connection_info)
|
Removed unneded local `_loop` veriable in Connection
|
diff --git a/lib/haibu/core/spawner.js b/lib/haibu/core/spawner.js
index <HASH>..<HASH> 100644
--- a/lib/haibu/core/spawner.js
+++ b/lib/haibu/core/spawner.js
@@ -128,6 +128,14 @@ Spawner.prototype.spawn = function spawn (repo, callback) {
drone = new forever.Monitor(script, foreverOptions);
//
+ // TODO this is only workaround!
+ //
+ drone.on('error', function() {
+ // 'error' event needs to be catched, otherwise nodejitsu process
+ // will die
+ });
+
+ //
// Log data from `drone.stdout` to haibu
// TODO (indexzero): This output should be in its own Loggly input (i.e. log.user instead of log.drone)
//
|
[core/spawner] listen to drone's 'error' event, workaround for crashing app problem
|
diff --git a/controller/worker/deployment/context.go b/controller/worker/deployment/context.go
index <HASH>..<HASH> 100644
--- a/controller/worker/deployment/context.go
+++ b/controller/worker/deployment/context.go
@@ -79,7 +79,12 @@ func (c *context) HandleDeployment(job *que.Job) (e error) {
// rollback failed deploy
if e != nil {
errMsg := e.Error()
- if !IsSkipRollback(e) {
+ if IsSkipRollback(e) {
+ // ErrSkipRollback indicates the deploy failed in some way
+ // but no further action should be taken, so set the error
+ // to nil to avoid retrying the deploy
+ e = nil
+ } else {
log.Warn("rolling back deployment due to error", "err", e)
e = c.rollback(log, deployment, f)
}
|
worker: Don't retry deploys when ErrSkipRollback is returned
Fixes #<I>.
|
diff --git a/salt/states/saltmod.py b/salt/states/saltmod.py
index <HASH>..<HASH> 100644
--- a/salt/states/saltmod.py
+++ b/salt/states/saltmod.py
@@ -245,6 +245,9 @@ def state(
m_ret = False
+ if 'return' in mdata and 'ret' not in mdata:
+ mdata['ret'] = mdata.pop('return')
+
if mdata.get('failed', False):
m_state = False
else:
|
Salt SSH orchestration returns `ret` as `return`. Adapt.
|
diff --git a/webwhatsapi/__init__.py b/webwhatsapi/__init__.py
index <HASH>..<HASH> 100755
--- a/webwhatsapi/__init__.py
+++ b/webwhatsapi/__init__.py
@@ -415,7 +415,7 @@ class WhatsAPIDriver(object):
raise ChatNotFoundError("Chat {0} not found".format(chat_id))
- def get_chat_from_phone_number(self, number):
+ def get_chat_from_phone_number(self, number, createIfNotFound = False):
"""
Gets chat by phone number
Number format should be as it appears in Whatsapp ID
@@ -431,13 +431,13 @@ class WhatsAPIDriver(object):
if not isinstance(chat, UserChat) or number not in chat.id:
continue
return chat
-
- self.create_chat_by_number(number)
- self.wait_for_login()
- for chat in self.get_all_chats():
- if not isinstance(chat, UserChat) or number not in chat.id:
- continue
- return chat
+ if(createIfNotFound):
+ self.create_chat_by_number(number)
+ self.wait_for_login()
+ for chat in self.get_all_chats():
+ if not isinstance(chat, UserChat) or number not in chat.id:
+ continue
+ return chat
raise ChatNotFoundError('Chat for phone {0} not found'.format(number))
def reload_qr(self):
|
change get_chat_from_phone_number
Possibilite to create new chat if no one found if you need this
|
diff --git a/lib/sprockets/directive_processor.rb b/lib/sprockets/directive_processor.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/directive_processor.rb
+++ b/lib/sprockets/directive_processor.rb
@@ -1,7 +1,5 @@
-require 'pathname'
require 'set'
require 'shellwords'
-require 'yaml'
module Sprockets
# The `DirectiveProcessor` is responsible for parsing and evaluating
|
Directive processor doesn't use pathname or yaml
|
diff --git a/lib/core/topologies/mongos.js b/lib/core/topologies/mongos.js
index <HASH>..<HASH> 100644
--- a/lib/core/topologies/mongos.js
+++ b/lib/core/topologies/mongos.js
@@ -366,7 +366,8 @@ function handleInitialConnectEvent(self, event) {
self.s.logger.warn(f(message, _this.name));
}
- // This is not a mongos proxy, remove it completely
+ // This is not a mongos proxy, destroy and remove it completely
+ _this.destroy(true);
removeProxyFrom(self.connectingProxies, _this);
// Emit the left event
self.emit('left', 'server', _this);
@@ -445,10 +446,9 @@ function connectProxies(self, servers) {
server.connect(self.s.connectOptions);
}, timeoutInterval);
}
+
// Start all the servers
- while (servers.length > 0) {
- connect(servers.shift(), timeoutInterval++);
- }
+ servers.forEach(server => connect(server, timeoutInterval++));
}
function pickProxy(self, session) {
|
fix(mongos): disconnect proxies which are not mongos instances
NODE-<I>
|
diff --git a/py/dynesty/utils.py b/py/dynesty/utils.py
index <HASH>..<HASH> 100644
--- a/py/dynesty/utils.py
+++ b/py/dynesty/utils.py
@@ -348,11 +348,13 @@ def resample_equal(samples, weights, rstate=None):
if rstate is None:
rstate = get_random_generator()
- if abs(np.sum(weights) - 1.) > SQRTEPS:
+ cumulative_sum = np.cumsum(weights)
+ if abs(cumulative_sum[-1] - 1.) > SQRTEPS:
# same tol as in numpy's random.choice.
# Guarantee that the weights will sum to 1.
warnings.warn("Weights do not sum to 1 and have been renormalized.")
- weights = np.asarray(weights) / np.sum(weights)
+ cumulative_sum /= cumulative_sum[-1]
+ # this ensures that the last element is strictly == 1
# Make N subdivisions and choose positions with a consistent random offset.
nsamples = len(weights)
@@ -360,7 +362,6 @@ def resample_equal(samples, weights, rstate=None):
# Resample the data.
idx = np.zeros(nsamples, dtype=int)
- cumulative_sum = np.cumsum(weights)
i, j = 0, 0
while i < nsamples:
if positions[i] < cumulative_sum[j]:
|
make resample_equal more numerically stable. solve #<I>
|
diff --git a/src/Commands/BotLimit.js b/src/Commands/BotLimit.js
index <HASH>..<HASH> 100644
--- a/src/Commands/BotLimit.js
+++ b/src/Commands/BotLimit.js
@@ -27,7 +27,7 @@ var botlimit = {
}
return;
}
- value = arguments[1]
+ value = arguments[1];
if (value >= 0) {
this.gameState.botDepartLimit = value;
} else {
diff --git a/src/Server.js b/src/Server.js
index <HASH>..<HASH> 100644
--- a/src/Server.js
+++ b/src/Server.js
@@ -765,7 +765,7 @@ Server.prototype.addBot = function (player) {
if (player.active) {
return false;
}
- bot = player
+ bot = player;
} else {
// Haetaan seuraava vapaa paikka botille
playerIds = Object.keys(this.players);
|
Fix the last two jshint errors! Woot!
|
diff --git a/email_confirm_la/admin.py b/email_confirm_la/admin.py
index <HASH>..<HASH> 100644
--- a/email_confirm_la/admin.py
+++ b/email_confirm_la/admin.py
@@ -7,11 +7,21 @@ from django.contrib import admin
from email_confirm_la.models import EmailConfirmation
+def resend_confirmation_email(modeladmin, request, queryset):
+ for confirmation in queryset:
+ if not confirmation.is_verified:
+ confirmation.send()
+
+resend_confirmation_email.short_description = 'Re-send selected %(verbose_name_plural)s'
+
+
class EmailConfirmationAdmin(admin.ModelAdmin):
+
def show_content_type(self, obj):
return obj.content_object._meta.object_name
show_content_type.short_description = 'Content type'
+ actions = [resend_confirmation_email, ]
list_display = ('show_content_type', 'content_object', 'email_field_name', 'email', 'is_verified', 'is_primary', 'send_at', 'confirmed_at')
list_display_links = list_display
search_fields = ('email', )
|
admin action: resend_confirmation_email Fixes #5
|
diff --git a/src/extensions/default/JavaScriptCodeHints/Session.js b/src/extensions/default/JavaScriptCodeHints/Session.js
index <HASH>..<HASH> 100644
--- a/src/extensions/default/JavaScriptCodeHints/Session.js
+++ b/src/extensions/default/JavaScriptCodeHints/Session.js
@@ -456,7 +456,12 @@ define(function (require, exports, module) {
cursor = sessionType.functionCallPos,
token = cursor ? this.getToken(cursor) : undefined,
varName;
- if (token) {
+ if (token &&
+ // only change the 'fn' when the token looks like a function
+ // name, and isn't some other kind of expression
+ (token.type === "variable" ||
+ token.type === "variable-2" ||
+ token.type === "property")) {
varName = token.string;
if (varName) {
fnHint = varName + fnHint.substr(2);
|
Fix Issue #<I>
Only replace the 'fn' in the function type hint if the token that was called looks like an identifier/property. If it is an expression, resulting in a function call, then just display 'fn' since we don't have a way to determine a 'name' for the called function.
|
diff --git a/salt/ssh/__init__.py b/salt/ssh/__init__.py
index <HASH>..<HASH> 100644
--- a/salt/ssh/__init__.py
+++ b/salt/ssh/__init__.py
@@ -101,10 +101,13 @@ class SSH(object):
'''
running = {}
target_iter = self.targets.__iter__()
+ done = set()
while True:
- done = set()
if len(running) < self.opts.get('ssh_max_procs', 5):
- host = next(target_iter)
+ try:
+ host = next(target_iter)
+ except StopIteration:
+ pass
for default in self.defaults:
if not default in self.targets[host]:
self.targets[host][default] = self.defaults[default]
@@ -138,7 +141,10 @@ class SSH(object):
yield {running[host]['single'].id: 'Bad Return'}
done.add(host)
for host in done:
- running.pop(host)
+ if host in running:
+ running.pop(host)
+ if len(done) >= len(self.targets):
+ break
def run(self):
'''
|
Fix error where iteration was breaking too soon
|
diff --git a/src/http-auth-interceptor.js b/src/http-auth-interceptor.js
index <HASH>..<HASH> 100644
--- a/src/http-auth-interceptor.js
+++ b/src/http-auth-interceptor.js
@@ -12,8 +12,8 @@
.factory('authService', ['$rootScope','httpBuffer', function($rootScope, httpBuffer) {
return {
- loginConfirmed: function() {
- $rootScope.$broadcast('event:auth-loginConfirmed');
+ loginConfirmed: function(data) {
+ $rootScope.$broadcast('event:auth-loginConfirmed', data);
httpBuffer.retryAll();
}
};
|
cherry-pick: Added ability to pass data along with login confirmation
This is quite useful if you want to listen out for login confirmation
and have access to *who* logged in (for presentation purposes)
Conflicts:
src/angular-http-auth.js
|
diff --git a/datadog_checks_base/setup.py b/datadog_checks_base/setup.py
index <HASH>..<HASH> 100644
--- a/datadog_checks_base/setup.py
+++ b/datadog_checks_base/setup.py
@@ -51,5 +51,7 @@ setup(
packages=['datadog_checks'],
include_package_data=True,
- install_requires=[],
+ extras_require={
+ 'deps': get_requirements('requirements.in'),
+ },
)
|
Allow installation of base dependencies (#<I>)
|
diff --git a/spec/dummy/lib/test_receiver.rb b/spec/dummy/lib/test_receiver.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/lib/test_receiver.rb
+++ b/spec/dummy/lib/test_receiver.rb
@@ -1,6 +1,5 @@
class TestReceiver
def receive(_env, _claims)
- [600, {}, ['Claims were not handled.']]
end
def logout(_env)
|
Removed unused line of test code
|
diff --git a/tests/test_utils_autoingest.py b/tests/test_utils_autoingest.py
index <HASH>..<HASH> 100644
--- a/tests/test_utils_autoingest.py
+++ b/tests/test_utils_autoingest.py
@@ -5,7 +5,7 @@ import ndio.utils.autoingest as AutoIngest
import numpy
import datetime
-SERVER_SITE = 'http://http://ec2-54-200-94-232.us-west-2.compute.amazonaws.com/'
+SERVER_SITE = 'http://ec2-54-200-94-232.us-west-2.compute.amazonaws.com/'
DATA_SITE = 'http://ec2-54-200-215-161.us-west-2.compute.amazonaws.com/'
class TestAutoIngest(unittest.TestCase):
|
Nginx now can support this
|
diff --git a/features/extra/no-mail.php b/features/extra/no-mail.php
index <HASH>..<HASH> 100644
--- a/features/extra/no-mail.php
+++ b/features/extra/no-mail.php
@@ -1,6 +1,7 @@
<?php
-function wp_mail() {
- // do nothing
+function wp_mail( $to ) {
+ // Log for testing purposes
+ WP_CLI::log( "WP-CLI test suite: Sent email to {$to}." );
}
|
Prevent email notifications when users are created
Email notifications should only be sent when `--send-email` is provided.
|
diff --git a/java/client/test/org/openqa/selenium/html5/LocalStorageTest.java b/java/client/test/org/openqa/selenium/html5/LocalStorageTest.java
index <HASH>..<HASH> 100644
--- a/java/client/test/org/openqa/selenium/html5/LocalStorageTest.java
+++ b/java/client/test/org/openqa/selenium/html5/LocalStorageTest.java
@@ -20,13 +20,16 @@ package org.openqa.selenium.html5;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeTrue;
+import static org.openqa.selenium.testing.Driver.FIREFOX;
import org.junit.Before;
import org.junit.Test;
+import org.openqa.selenium.testing.Ignore;
import org.openqa.selenium.testing.JUnit4TestBase;
import java.util.Set;
+@Ignore(FIREFOX)
public class LocalStorageTest extends JUnit4TestBase {
@Before
public void checkHasWebStorage() {
|
Ignoring a test in legacy FirefoxDriver
|
diff --git a/thingy.py b/thingy.py
index <HASH>..<HASH> 100644
--- a/thingy.py
+++ b/thingy.py
@@ -89,8 +89,8 @@ class Thingy(object):
def update(self, *args, **kwargs):
self._update(*args, **kwargs)
- def view(self, name="defaults", *args, **kwargs):
- return self._views[name](self, *args, **kwargs)
+ def view(self, name="defaults"):
+ return self._views[name](self)
names_regex = re.compile("([A-Z][a-z]+)")
|
Simplify Thingy.view for now
|
diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py
index <HASH>..<HASH> 100644
--- a/sos/plugins/postgresql.py
+++ b/sos/plugins/postgresql.py
@@ -92,13 +92,6 @@ class PostgreSQL(Plugin):
self.add_alert(
"WARN: password must be supplied to dump a database."
)
- else:
- self.soslog.warning(
- "dbname must be supplied to dump a database."
- )
- self.add_alert(
- "WARN: dbname must be supplied to dump a database."
- )
def postproc(self):
import shutil
|
[postgresql] don't warn if dbname is not set
Fixes #<I>.
|
diff --git a/class/StateMachine/FlupdoCrudMachine.php b/class/StateMachine/FlupdoCrudMachine.php
index <HASH>..<HASH> 100644
--- a/class/StateMachine/FlupdoCrudMachine.php
+++ b/class/StateMachine/FlupdoCrudMachine.php
@@ -37,12 +37,6 @@ class FlupdoCrudMachine extends FlupdoMachine
{
parent::initializeMachine($config);
- // Name of inputs and outputs with properties
- $io_name = (string) $config['io_name'];
- if ($io_name == '') {
- $io_name = 'item';
- }
-
// user_id table column & auth property
if (isset($config['user_id_table_column'])) {
$this->user_id_table_column = $config['user_id_table_column'];
@@ -73,6 +67,21 @@ class FlupdoCrudMachine extends FlupdoMachine
$this->scanTableColumns();
}
+ $this->setupDefaultMachine($config);
+ }
+
+
+ /**
+ * Setup basic CRUD machine.
+ */
+ protected function setupDefaultMachine($config)
+ {
+ // Name of inputs and outputs with properties
+ $io_name = (string) $config['io_name'];
+ if ($io_name == '') {
+ $io_name = 'item';
+ }
+
// Exists state only
$this->states = array(
'exists' => array(
|
FlupdoCrudMachine: Move definition of default state and transitions to overridable method.
|
diff --git a/src/Command/ChainCommand.php b/src/Command/ChainCommand.php
index <HASH>..<HASH> 100644
--- a/src/Command/ChainCommand.php
+++ b/src/Command/ChainCommand.php
@@ -87,7 +87,7 @@ class ChainCommand extends ContainerAwareCommand
}
$this->getHelper('chain')
- ->addCommand($command['command'], $moduleInputs, $interactive, $learning);
+ ->addCommand($command['name'], $moduleInputs, $interactive, $learning);
}
}
}
|
#<I>: [ChainCommand] Add "name" to the yaml definition reguirement. fixes #<I>.
|
diff --git a/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php b/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php
index <HASH>..<HASH> 100644
--- a/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php
+++ b/core-bundle/tests/DependencyInjection/ContaoCoreExtensionTest.php
@@ -646,7 +646,6 @@ class ContaoCoreExtensionTest extends TestCase
$definition = $this->container->getDefinition('contao.image.resize_calculator');
$this->assertSame(ResizeCalculator::class, $definition->getClass());
- $this->assertFalse($definition->isPublic());
}
/**
@@ -789,7 +788,6 @@ class ContaoCoreExtensionTest extends TestCase
$definition = $this->container->getDefinition('contao.menu.renderer');
$this->assertSame(ListRenderer::class, $definition->getClass());
- $this->assertTrue($definition->isPublic());
$this->assertSame('contao.menu.matcher', (string) $definition->getArgument(0));
}
|
[Core] Fix the tests.
|
diff --git a/lib/l20n/resolver.js b/lib/l20n/resolver.js
index <HASH>..<HASH> 100644
--- a/lib/l20n/resolver.js
+++ b/lib/l20n/resolver.js
@@ -162,9 +162,10 @@ function interpolate(ctxdata, env, arr) {
}
function resolveSelector(ctxdata, env, expr, index) {
- var selector = resolveIdentifier(ctxdata, env, index[0].v);
+ var selectorName = index[0].v;
+ var selector = resolveIdentifier(ctxdata, env, selectorName);
if (selector === undefined) {
- throw new L10nError('Unknown selector: ' + index[0].v);
+ throw new L10nError('Unknown selector: ' + selectorName);
}
if (typeof selector !== 'function') {
@@ -174,7 +175,7 @@ function resolveSelector(ctxdata, env, expr, index) {
var argLength = index.length - 1;
if (selector.length !== argLength) {
- throw new L10nError('Macro ' + index[0] + ' expects ' +
+ throw new L10nError('Macro ' + selectorName + ' expects ' +
selector.length + ' argument(s), yet ' + argLength +
' given');
}
|
Bug <I> - Use selector name in resolver's error message. r=gandalf
|
diff --git a/tests/Relation/OneToOneTestCase.php b/tests/Relation/OneToOneTestCase.php
index <HASH>..<HASH> 100644
--- a/tests/Relation/OneToOneTestCase.php
+++ b/tests/Relation/OneToOneTestCase.php
@@ -69,4 +69,18 @@ class Doctrine_Relation_OneToOne_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($ref->name, 'ref 1');
$this->assertEqual($ref->createdBy->name, 'ref 2');
}
+
+ public function testUnsetRelation()
+ {
+ $user = new User();
+ $user->name = "test";
+ $email = new Email();
+ $email->address = "test@test.com";
+ $user->Email = $email;
+ $user->save();
+ $this->assertTrue($user->Email instanceOf Email);
+ $user->Email = Email::getNullObject();
+ $user->save();
+ $this->assertTrue($user->Email instanceOf Doctrine_Null);
+ }
}
|
added test to ensure that a link to a hasOne resource can be unset
|
diff --git a/libraries/mako/Mako.php b/libraries/mako/Mako.php
index <HASH>..<HASH> 100644
--- a/libraries/mako/Mako.php
+++ b/libraries/mako/Mako.php
@@ -346,10 +346,10 @@ namespace mako
$highlight = function($string)
{
- $search = array("\n", '<code>', '</code>', '<span style="color: #0000BB"><?php ');
- $replace = array('', '', '', '<span style="color: #0000BB">');
+ $search = array("\n", '<code>', '</code>', '<span style="color: #0000BB"><?php ', '#$@r4!/*');
+ $replace = array('', '', '', '<span style="color: #0000BB">', '/*');
- return str_replace($search, $replace, highlight_string('<?php ' . $string, true));
+ return str_replace($search, $replace, highlight_string('<?php ' . str_replace('/*', '#$@r4!/*', $string), true));
};
$handle = fopen($file, 'r');
|
Fix for compile errors when highlighting the first line of a multi line comment
|
diff --git a/classes/Poll.php b/classes/Poll.php
index <HASH>..<HASH> 100644
--- a/classes/Poll.php
+++ b/classes/Poll.php
@@ -113,6 +113,9 @@ class Poll extends ElggObject {
$this->deleteChoices();
+ // Ignore access (necessary in case a group admin is editing the poll of another group member)
+ $ia = elgg_set_ignore_access(true);
+
$i = 0;
foreach ($choices as $choice) {
$poll_choice = new ElggObject();
@@ -127,6 +130,8 @@ class Poll extends ElggObject {
add_entity_relationship($poll_choice->guid, 'poll_choice', $this->guid);
$i += 1;
}
+
+ elgg_set_ignore_access($ia);
}
/**
|
Ignore access for adding poll choices to allow for group admins editing polls of other group members
|
diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodOperationsImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodOperationsImpl.java
index <HASH>..<HASH> 100644
--- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodOperationsImpl.java
+++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/PodOperationsImpl.java
@@ -154,7 +154,9 @@ public class PodOperationsImpl extends HasMetadataOperation<Pod, PodList, Doneab
URL url = new URL(URLUtils.join(getResourceUrl().toString(), getLogParameters() + "&follow=true"));
Request request = new Request.Builder().url(url).get().build();
final LogWatchCallback callback = new LogWatchCallback(out);
- client.newCall(request).enqueue(callback);
+ OkHttpClient clone = client.clone();
+ clone.setReadTimeout(0, TimeUnit.MILLISECONDS);
+ clone.newCall(request).enqueue(callback);
callback.waitUntilReady();
return callback;
} catch (Throwable t) {
|
Disable read timeout for log watching
|
diff --git a/completion.js b/completion.js
index <HASH>..<HASH> 100644
--- a/completion.js
+++ b/completion.js
@@ -1,7 +1,7 @@
var fs = require('fs');
var path = require('path');
-var HOME = process.env.HOME || process.env.USERPROFILE;
+var HOME = process.env.HOME || process.env.USERPROFILE || '';
var PROFILE = [
path.join(HOME, '.bashrc'),
|
Avoid exception when the HOME and USERPROFILE env var are not defined
|
diff --git a/iribaker/__init__.py b/iribaker/__init__.py
index <HASH>..<HASH> 100644
--- a/iribaker/__init__.py
+++ b/iribaker/__init__.py
@@ -51,8 +51,10 @@ def to_iri(iri):
# Replace the invalid characters with an underscore (no need to roundtrip)
quoted_parts['path'] = no_invalid_characters.sub(u'_', parts.path)
- quoted_parts['fragment'] = no_invalid_characters.sub(u'_', parts.fragment)
- quoted_parts['query'] = urllib.quote(parts.query.encode('utf-8'))
+ if parts.fragment:
+ quoted_parts['fragment'] = no_invalid_characters.sub(u'_', parts.fragment)
+ if parts.query:
+ quoted_parts['query'] = urllib.quote(parts.query.encode('utf-8'))
# Leave these untouched
quoted_parts['scheme'] = parts.scheme
quoted_parts['authority'] = parts.netloc
|
Fixed issue where # and ? were appended to IRIs
|
diff --git a/test/test_mock.rb b/test/test_mock.rb
index <HASH>..<HASH> 100644
--- a/test/test_mock.rb
+++ b/test/test_mock.rb
@@ -18,6 +18,11 @@ describe Muack::Mock do
3.times{ Obj.say.should.eq 'goo' }
end
+ should 'mock existing method' do
+ mock(Obj).to_s{ 'zoo' }
+ Obj.to_s.should.eq 'zoo'
+ end
+
should 'mock twice' do
mock(Obj).say(true){ Obj.saya }
mock(Obj).saya{ 'coo' }
|
add a test for last commit, and it reveals a bug...
|
diff --git a/test/functional/StateListAwareTraitTest.php b/test/functional/StateListAwareTraitTest.php
index <HASH>..<HASH> 100644
--- a/test/functional/StateListAwareTraitTest.php
+++ b/test/functional/StateListAwareTraitTest.php
@@ -73,6 +73,11 @@ class StateListAwareTraitTest extends TestCase
);
}
+ /**
+ * Tests the state key getter method.
+ *
+ * @since [*next-version*]
+ */
public function testGetStateKey()
{
$subject = $this->createInstance();
|
Added missing PHP doc block for test
|
diff --git a/stl/stl.py b/stl/stl.py
index <HASH>..<HASH> 100644
--- a/stl/stl.py
+++ b/stl/stl.py
@@ -119,10 +119,10 @@ class BaseStl(base.BaseMesh):
line += lines.pop(0)
line = line.lower().strip()
- if prefix:
- if line == b(''):
- return get(prefix)
+ if line == b(''):
+ return get(prefix)
+ if prefix:
if line.startswith(prefix):
values = line.replace(prefix, b(''), 1).strip().split()
elif line.startswith(b('endsolid')):
|
Check for blank line with and without a prefix
We want to check for a blank line regardless if the caller has provided
a prefix to check for or not.
|
diff --git a/sources/scala/tools/scaladoc/Page.java b/sources/scala/tools/scaladoc/Page.java
index <HASH>..<HASH> 100644
--- a/sources/scala/tools/scaladoc/Page.java
+++ b/sources/scala/tools/scaladoc/Page.java
@@ -124,10 +124,14 @@ class Page extends HTMLPrinter {
* f1 and f2 should be of the form (A/...)
*/
static private File asSeenFrom(File f1, File f2) {
- File lcp = longestCommonPrefix(f1, f2);
- File relf1 = subtractPrefix(lcp, f1);
- File relf2 = subtractPrefix(lcp, f2);
- return new File(pathToRoot(relf2), relf1.getPath());
+ if (f1.equals(f2))
+ return new File(f1.getName());
+ else {
+ File lcp = longestCommonPrefix(f1, f2);
+ File relf1 = subtractPrefix(lcp, f1);
+ File relf2 = subtractPrefix(lcp, f2);
+ return new File(pathToRoot(relf2), relf1.getPath());
+ }
}
// where
/** p and q should be of the form (A/...) */
|
- Fixed the bug that occured when a page refers...
- Fixed the bug that occured when a page refers to itself. It came from
the optimization in the computation of the shortest from a page to
another.
|
diff --git a/lib/mshoplib/setup/TreeAddParentId.php b/lib/mshoplib/setup/TreeAddParentId.php
index <HASH>..<HASH> 100644
--- a/lib/mshoplib/setup/TreeAddParentId.php
+++ b/lib/mshoplib/setup/TreeAddParentId.php
@@ -1,8 +1,8 @@
<?php
/**
- * @copyright Copyright (c) Metaways Infosystems GmbH, 2011
+ * @copyright Copyright (c) Metaways Infosystems GmbH, 2013
* @license LGPLv3, http://www.arcavias.com/en/license
- * @version $Id: CatalogAddCode.php 14251 2011-12-09 13:36:27Z nsendetzky $
+ * @version $Id$
*/
/**
|
Fixes year in the header.
|
diff --git a/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java b/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java
index <HASH>..<HASH> 100644
--- a/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java
+++ b/core/typechecker/src/main/java/org/overture/typechecker/utilities/pattern/AllDefinitionLocator.java
@@ -189,7 +189,7 @@ public class AllDefinitionLocator
PType type = pattern.getType();
- if (!af.createPTypeAssistant().isRecord(type))
+ if (!af.createPTypeAssistant().isTag(type)) //.isRecord(type))
{
TypeCheckerErrors.report(3200, "Mk_ expression is not a record type", pattern.getLocation(), pattern);
TypeCheckerErrors.detail("Type", type);
|
Correction to record pattern TC, fixes #<I>
|
diff --git a/lib/motion-kit/layout/layout.rb b/lib/motion-kit/layout/layout.rb
index <HASH>..<HASH> 100644
--- a/lib/motion-kit/layout/layout.rb
+++ b/lib/motion-kit/layout/layout.rb
@@ -162,7 +162,7 @@ module MotionKit
# this last little "catch-all" method is helpful to warn against methods
# that are defined already
def self.method_added(method_name)
- if Layout.method_defined?(method_name)
+ if self < Layout && Layout.method_defined?(method_name)
NSLog("Warning! The method #{self.name}##{method_name} has already been defined on MotionKit::Layout or one of its ancestors.")
end
end
|
don't warn about adding methods directly to Layout
|
diff --git a/test/unit/TemplateParentTest.php b/test/unit/TemplateParentTest.php
index <HASH>..<HASH> 100644
--- a/test/unit/TemplateParentTest.php
+++ b/test/unit/TemplateParentTest.php
@@ -289,6 +289,35 @@ class TemplateParentTest extends TestCase {
}
public function testComponentAndTemplatePrefixAddedToTemplateComponentElement() {
+ $componentDir = self::TEST_DIR . "/" . self::COMPONENT_PATH;
+ file_put_contents(
+ "$componentDir/title-definition-list.html",
+ Helper::COMPONENT_TITLE_DEFINITION_LIST
+ );
+ file_put_contents(
+ "$componentDir/title-definition.html",
+ Helper::COMPONENT_TITLE_DEFINITION
+ );
+ file_put_contents(
+ "$componentDir/ordered-list.html",
+ Helper::COMPONENT_ORDERED_LIST
+ );
+ $document = new HTMLDocument(
+ Helper::HTML_COMPONENTS,
+ $componentDir
+ );
+ $document->expandComponents();
+
+ $t = $document->getTemplate("title-definition-list");
+ self::assertInstanceOf(DocumentFragment::class, $t);
+ $inserted = $document->body->appendChild($t);
+
+ self::assertTrue(
+ $inserted->classList->contains("c-title-definition-list")
+ );
+ self::assertTrue(
+ $inserted->classList->contains("t-title-definition-list")
+ );
}
}
\ No newline at end of file
|
Test component and template prefix added to template-component elements
|
diff --git a/bosh_cli/spec/unit/core_ext_spec.rb b/bosh_cli/spec/unit/core_ext_spec.rb
index <HASH>..<HASH> 100644
--- a/bosh_cli/spec/unit/core_ext_spec.rb
+++ b/bosh_cli/spec/unit/core_ext_spec.rb
@@ -86,7 +86,7 @@ describe Object do
end
it 'has a warn helper' do
- should_receive(:warn).with("[WARNING] Could not find keypair".make_yellow)
+ expect(self).to receive(:warn).with("[WARNING] Could not find keypair".make_yellow)
warning("Could not find keypair")
end
|
Fix the last 'should' syntax assertion
|
diff --git a/snmp_passpersist.py b/snmp_passpersist.py
index <HASH>..<HASH> 100644
--- a/snmp_passpersist.py
+++ b/snmp_passpersist.py
@@ -284,7 +284,10 @@ class PassPersist:
Direct call is unnecessary.
"""
# Renice updater thread to limit overload
- os.nice(1)
+ try:
+ os.nice(1)
+ except AttributeError as er:
+ pass # os.nice is not available on windows
time.sleep(self.refresh)
try:
|
allow testing the code on windows
os.nice(1) doesn't work on windows
|
diff --git a/lib/podio/middleware/date_conversion.rb b/lib/podio/middleware/date_conversion.rb
index <HASH>..<HASH> 100644
--- a/lib/podio/middleware/date_conversion.rb
+++ b/lib/podio/middleware/date_conversion.rb
@@ -9,7 +9,7 @@ module Podio
# Converts all attributes ending with "_on" to datetime and ending with "date" to date
def self.convert_dates(body)
- [body].flatten.each do |hash|
+ [body].flatten.compact.each do |hash|
hash.each do |key, value|
if value.is_a?(Hash)
self.convert_dates(value)
|
Fixed a bug in the date conversion middleware
|
diff --git a/lib/seahorse/client/plugins/endpoint.rb b/lib/seahorse/client/plugins/endpoint.rb
index <HASH>..<HASH> 100644
--- a/lib/seahorse/client/plugins/endpoint.rb
+++ b/lib/seahorse/client/plugins/endpoint.rb
@@ -16,10 +16,6 @@ module Seahorse
module Plugins
class Endpoint < Plugin
- option(:endpoint) { |config| config.api.endpoint }
-
- option(:ssl_default, true)
-
# @api private
class EndpointHandler < Handler
@@ -34,6 +30,10 @@ module Seahorse
end
+ option(:endpoint) { |config| config.api.endpoint }
+
+ option(:ssl_default, true)
+
handler(EndpointHandler, priority: :build)
end
|
Grouped the plugin configuration under the helper class.
|
diff --git a/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java b/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java
index <HASH>..<HASH> 100644
--- a/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java
+++ b/base/src/main/java/uk/ac/ebi/atlas/search/analyticsindex/solr/AnalyticsQueryClient.java
@@ -25,6 +25,7 @@ import java.text.MessageFormat;
import java.util.List;
import java.util.concurrent.TimeUnit;
+import static org.apache.commons.lang3.StringUtils.isBlank;
import static uk.ac.ebi.atlas.search.SemanticQuery.isNotEmpty;
import static uk.ac.ebi.atlas.search.analyticsindex.solr.AnalyticsQueryClient.Field.*;
@@ -165,7 +166,7 @@ public class AnalyticsQueryClient {
}
private void addQueryClause(Field searchField, String searchValue) {
- if (!searchValue.isEmpty()) {
+ if (!isBlank(searchValue)) {
queryClausesBuilder.add(new AnalyticsSolrQueryTree(searchField.toString(), searchValue));
}
}
|
Check for String emptiness using isBlank to guard against nulls
|
diff --git a/lib/rack/jekyll.rb b/lib/rack/jekyll.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/jekyll.rb
+++ b/lib/rack/jekyll.rb
@@ -19,11 +19,12 @@ module Rack
config_file = opts[:config] || "_config.yml"
if ::File.exist?(config_file)
config = YAML.load_file(config_file)
-
- @path = config['destination'] || "_site"
- @files = ::Dir[@path + "/**/*"].inspect
- puts @files.inspect if ENV['RACK_DEBUG']
+ @path = config['destination']
end
+ @path ||= "_site"
+
+ @files = ::Dir[@path + "/**/*"].inspect
+ puts @files.inspect if ENV['RACK_DEBUG']
@mimes = Rack::Mime::MIME_TYPES.map{|k,v| /#{k.gsub('.','\.')}$/i }
options = ::Jekyll.configuration(opts)
|
Fix broken initialization of instance variables
Make sure instance variables are always initialized,
not only when a config file exists.
|
diff --git a/cutil/retry/retry.go b/cutil/retry/retry.go
index <HASH>..<HASH> 100644
--- a/cutil/retry/retry.go
+++ b/cutil/retry/retry.go
@@ -54,17 +54,17 @@ func (r *Retrier) RunRetry() error {
finish := make(chan bool, 1)
go func() {
select {
- case <-finish:
- return
- case <-time.After(600 * time.Second):
- return
- default:
- for {
- if sigHandler.GetState() != 0 {
- logger.Critical("detected signal. retry failed.")
- os.Exit(1)
- }
+ case <-finish:
+ return
+ case <-time.After(600 * time.Second):
+ return
+ default:
+ for {
+ if sigHandler.GetState() != 0 {
+ logger.Critical("detected signal. retry failed.")
+ os.Exit(1)
}
+ }
}
}()
diff --git a/cutil/retry/retry_test.go b/cutil/retry/retry_test.go
index <HASH>..<HASH> 100644
--- a/cutil/retry/retry_test.go
+++ b/cutil/retry/retry_test.go
@@ -55,4 +55,4 @@ func TestRetrySad(t *testing.T) {
if err.Error() != want.Error() {
t.Errorf("unexpected error\n\tgot: %#v\n\twant: %#v", err, want)
}
-}
\ No newline at end of file
+}
|
retry: gofmt
|
diff --git a/lib/podio/areas/user.rb b/lib/podio/areas/user.rb
index <HASH>..<HASH> 100644
--- a/lib/podio/areas/user.rb
+++ b/lib/podio/areas/user.rb
@@ -19,5 +19,13 @@ module Podio
def find_all_admins_for_org(org_id)
list Podio.connection.get("/org/#{org_id}/admin/").body
end
+
+ def get_property(name, value)
+ Podio.connection.get("/user/property/#{name}").body['value']
+ end
+
+ def set_property(name, value)
+ Podio.connection.put("/user/property/#{name}", {:value => value}).status
+ end
end
end
|
Added get and set property operations on User area
|
diff --git a/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java b/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java
index <HASH>..<HASH> 100644
--- a/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java
+++ b/power-adapters-data/src/main/java/com/nextfaze/poweradapters/data/IncrementalArrayData.java
@@ -257,7 +257,6 @@ public abstract class IncrementalArrayData<T> extends AbstractData<T> implements
@Override
public final void invalidate() {
- stopThread();
mDirty = true;
mClear = true;
}
|
Don't stop loading thread upon invalidate() in IncrementalArrayData
This caused an ongoing load to cancel, which could then result in empty contents, which violates the contract of invalidate().
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -25,13 +25,15 @@ release = '0.7.2'
extensions = [
'sphinx.ext.autodoc',
- 'sphinx.ext.doctest',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'm2r',
]
+if os.getenv('HVAC_RENDER_DOCTESTS') is None:
+ extensions.append('sphinx.ext.doctest')
+
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
|
Do no run doctest during readthedocs builds
|
diff --git a/lib/url/url.js b/lib/url/url.js
index <HASH>..<HASH> 100755
--- a/lib/url/url.js
+++ b/lib/url/url.js
@@ -19,7 +19,7 @@ var crypto = require('../node/crypto'),
var ImboUrl = function(options) {
this.transformations = [];
this.baseUrl = options.baseUrl;
- this.user = options.user || options.publicKey;
+ this.user = typeof options.user === 'undefined' ? options.publicKey : options.user;
this.publicKey = options.publicKey;
this.privateKey = options.privateKey;
this.extension = options.extension;
|
Allow explicitly setting user on URLs to null
|
diff --git a/tests/test_nonlinear.py b/tests/test_nonlinear.py
index <HASH>..<HASH> 100644
--- a/tests/test_nonlinear.py
+++ b/tests/test_nonlinear.py
@@ -261,7 +261,7 @@ def test_gastrans():
if scip.getStatus() == 'timelimit':
pytest.skip()
- assert abs(scip.getPrimalbound() - 89.08584) < 1.0e-9
+ assert abs(scip.getPrimalbound() - 89.08584) < 1.0e-6
def test_quad_coeffs():
"""test coefficient access method for quadratic constraints"""
|
Update test_nonlinear.py
Fixing assert failure if scip is compiled using quadprecision
|
diff --git a/cloud/digitalocean/droplet/resources/droplet.go b/cloud/digitalocean/droplet/resources/droplet.go
index <HASH>..<HASH> 100644
--- a/cloud/digitalocean/droplet/resources/droplet.go
+++ b/cloud/digitalocean/droplet/resources/droplet.go
@@ -333,7 +333,7 @@ func (r *Droplet) immutableRender(newResource cloud.Resource, inaccurateCluster
for i := 0; i < len(machineProviderConfigs); i++ {
machineProviderConfig := machineProviderConfigs[i]
- if machineProviderConfig.ServerPool.Name == newResource.(*Droplet).Name && newResource.(*Droplet).ServerPool != nil && serverPool.Type != "node" && newResource.(*Droplet).Name != "" {
+ if machineProviderConfig.ServerPool.Name == newResource.(*Droplet).Name && newResource.(*Droplet).ServerPool != nil {
machineProviderConfig.ServerPool.Image = newResource.(*Droplet).Image
machineProviderConfig.ServerPool.Size = newResource.(*Droplet).Size
machineProviderConfig.ServerPool.MaxCount = newResource.(*Droplet).Count
|
cloud,digitalocean: refactor
|
diff --git a/lib/airbrake-ruby.rb b/lib/airbrake-ruby.rb
index <HASH>..<HASH> 100644
--- a/lib/airbrake-ruby.rb
+++ b/lib/airbrake-ruby.rb
@@ -127,14 +127,6 @@ module Airbrake
def merge_context(_context); end
end
- # @deprecated Use {Airbrake::NoticeNotifier} instead
- Notifier = NoticeNotifier
- deprecate_constant(:Notifier) if respond_to?(:deprecate_constant)
-
- # @deprecated Use {Airbrake::NilNoticeNotifier} instead
- NilNotifier = NilNoticeNotifier
- deprecate_constant(:NilNotifier) if respond_to?(:deprecate_constant)
-
# NilPerformanceNotifier is a no-op notifier, which mimics
# {Airbrake::PerformanceNotifier} and serves only the purpose of making the
# library API easier to use.
|
airbrake-ruby: delete deprecated constants
Deleted deprecated `Airbrake::Notifier` & `Airbrake::NilNotifier`.
|
diff --git a/lib/appsignal/hooks/sidekiq.rb b/lib/appsignal/hooks/sidekiq.rb
index <HASH>..<HASH> 100644
--- a/lib/appsignal/hooks/sidekiq.rb
+++ b/lib/appsignal/hooks/sidekiq.rb
@@ -22,10 +22,10 @@ module Appsignal
class SidekiqPlugin
include Appsignal::Hooks::Helpers
- JOB_KEYS = Set.new(%w(
+ JOB_KEYS = %w(
args backtrace class created_at enqueued_at error_backtrace error_class
error_message failed_at jid retried_at retry wrapped
- )).freeze
+ ).freeze
def call(_worker, item, _queue)
transaction = Appsignal::Transaction.create(
|
Remove Set usage (#<I>)
In PR #<I> the Sidekiq hook `job_keys` method was moved to the
`JOB_KEYS` constant. As its value is a `Set` instance the `set` library
is required to be loaded beforehand. This was loaded by Sidekiq in
<URL>
```
|
diff --git a/lib/semlogr/logger.rb b/lib/semlogr/logger.rb
index <HASH>..<HASH> 100644
--- a/lib/semlogr/logger.rb
+++ b/lib/semlogr/logger.rb
@@ -76,11 +76,11 @@ module Semlogr
return true if @sinks.size.zero?
return true if severity < @min_severity
- if template.nil? && block
+ if block
template, properties = yield
properties ||= {}
- error = properties[:error]
+ error = properties.delete(:error)
end
log_event = create_log_event(severity, template, error, properties)
|
Handle progname based logging, initially this is not outputting the progname anywhere and this might come later.
|
diff --git a/test/providers/amplitude.js b/test/providers/amplitude.js
index <HASH>..<HASH> 100644
--- a/test/providers/amplitude.js
+++ b/test/providers/amplitude.js
@@ -13,7 +13,6 @@ describe('Amplitude', function () {
analytics.initialize({ 'Amplitude' : test['Amplitude'] });
expect(spy.called).to.be(true);
expect(window.amplitude).not.to.be(undefined);
- expect(window.amplitude.sendEvents).to.be(undefined);
// When the library loads, it will replace the `logEvent` method.
var stub = window.amplitude.logEvent;
|
amplitude: missed a spot
|
diff --git a/examples.py b/examples.py
index <HASH>..<HASH> 100644
--- a/examples.py
+++ b/examples.py
@@ -24,6 +24,6 @@ plt.imshow(im)
plt.subplot(2, 2, 3)
plt.imshow(chords)
plt.subplot(2, 2, 4)
-plt.imshow(colored_chords, cmap=plt.cm.spectral)
+plt.imshow(colored_chords)
plt.subplot(2, 2, 2)
plt.hist(ps.metrics.chord_length_distribution(chords), bins=20)
|
removing spectral colormap, for some reason it's breaking on travis
|
diff --git a/resources/assets/javascripts/include/field.type_sortable.js b/resources/assets/javascripts/include/field.type_sortable.js
index <HASH>..<HASH> 100644
--- a/resources/assets/javascripts/include/field.type_sortable.js
+++ b/resources/assets/javascripts/include/field.type_sortable.js
@@ -45,7 +45,13 @@ jQuery(document).ready($ => {
container.on('DOMNodeInserted DOMNodeRemoved', () => sortable.update());
container.sortable({
items: '> .item',
- update: () => sortable.update()
+ update: () => sortable.update(),
+ stop: (event, ui) => {
+ ui.item.find('textarea').trigger('richtextresume');
+ },
+ start: (event, ui) => {
+ ui.item.find('textarea').trigger('richtextsuspend');
+ }
});
});
});
\ No newline at end of file
|
Fix ckeditor breaking when being sorted
|
diff --git a/glad/util.py b/glad/util.py
index <HASH>..<HASH> 100644
--- a/glad/util.py
+++ b/glad/util.py
@@ -10,5 +10,5 @@ _API_NAMES = {
def api_name(api):
api = api.lower()
- return _API_NAMES[api]
+ return _API_NAMES.get(api, api.upper())
|
glad: don't fail on an unknown api.
|
diff --git a/jaraco/packaging/cheese.py b/jaraco/packaging/cheese.py
index <HASH>..<HASH> 100644
--- a/jaraco/packaging/cheese.py
+++ b/jaraco/packaging/cheese.py
@@ -96,7 +96,10 @@ class RevivedDistribution(distutils.dist.Distribution):
the long description doesn't load properly (gets unwanted indents),
so fix it.
"""
- lines = io.StringIO(self.metadata.get_long_description())
+ desc = self.metadata.get_long_description()
+ if not isinstance(desc, six.text_type):
+ desc = desc.decode('utf-8')
+ lines = io.StringIO(desc)
def trim_eight_spaces(line):
if line.startswith(' '*8):
line = line[8:]
|
Restore Python 2 support in RevivedDistribution
|
diff --git a/pkg/minikube/tunnel/tunnel.go b/pkg/minikube/tunnel/tunnel.go
index <HASH>..<HASH> 100644
--- a/pkg/minikube/tunnel/tunnel.go
+++ b/pkg/minikube/tunnel/tunnel.go
@@ -200,7 +200,7 @@ func setupBridge(t *tunnel) {
return
}
iface := string(response)
- pattern := regexp.MustCompile(`.*member: (en\d+) flags=.*`)
+ pattern := regexp.MustCompile(`.*member: ((?:vm)?en(?:et)?\d+) flags=.*`)
submatch := pattern.FindStringSubmatch(iface)
if len(submatch) != 2 {
t.status.RouteError = fmt.Errorf("couldn't find member in bridge100 interface: %s", iface)
|
feat: Use new bridge interface name on OSX Monterey
|
diff --git a/app/Http/Controllers/Dashboard/ScheduleController.php b/app/Http/Controllers/Dashboard/ScheduleController.php
index <HASH>..<HASH> 100644
--- a/app/Http/Controllers/Dashboard/ScheduleController.php
+++ b/app/Http/Controllers/Dashboard/ScheduleController.php
@@ -140,7 +140,7 @@ class ScheduleController extends Controller
$scheduleData = Binput::get('incident');
// Parse the schedule date.
- $scheduledAt = app(DateFactory::class)->createNormalized('d/m/Y H:i', $scheduleData['scheduled_at']);
+ $scheduledAt = app(DateFactory::class)->create('d/m/Y H:i', $scheduleData['scheduled_at']);
if ($scheduledAt->isPast()) {
$messageBag = new MessageBag();
|
Fixed editing maintenance scheduled time
Closes #<I>.
|
diff --git a/examples/main.go b/examples/main.go
index <HASH>..<HASH> 100644
--- a/examples/main.go
+++ b/examples/main.go
@@ -217,6 +217,7 @@ func main() {
t, _ := template.New("foo").Parse(indexTemplate)
t.Execute(res, providerIndex)
})
+ log.Println("listening on localhost:3000")
log.Fatal(http.ListenAndServe(":3000", p))
}
|
add log line about which port is being listened on to example
this makes using the example easier
|
diff --git a/test/cluster/cluster.go b/test/cluster/cluster.go
index <HASH>..<HASH> 100644
--- a/test/cluster/cluster.go
+++ b/test/cluster/cluster.go
@@ -659,8 +659,8 @@ func (c *Cluster) DumpLogs(buildLog *buildlog.Log) {
fields := strings.Split(job, "-")
jobID := strings.Join(fields[len(fields)-2:], "-")
cmds := []string{
- fmt.Sprintf("flynn-host inspect %s", jobID),
- fmt.Sprintf("flynn-host log --init %s", jobID),
+ fmt.Sprintf("timeout 10s flynn-host inspect %s", jobID),
+ fmt.Sprintf("timeout 10s flynn-host log --init %s", jobID),
}
if err := run(fmt.Sprintf("%s-%s.log", typ, job), instances[0], cmds...); err != nil {
continue
|
test: Timeout `flynn-host` commands in DumpLogs
These commands sometimes block indefinitely in CI (e.g. if getting the
log of an interactive job which is stuck).
|
diff --git a/salt/modules/test_virtual.py b/salt/modules/test_virtual.py
index <HASH>..<HASH> 100644
--- a/salt/modules/test_virtual.py
+++ b/salt/modules/test_virtual.py
@@ -9,5 +9,5 @@ def __virtual__():
return False
-def test():
+def ping():
return True
|
Fix mis-naming from pylint cleanup
|
diff --git a/lib/dynflow/execution_plan.rb b/lib/dynflow/execution_plan.rb
index <HASH>..<HASH> 100644
--- a/lib/dynflow/execution_plan.rb
+++ b/lib/dynflow/execution_plan.rb
@@ -126,8 +126,8 @@ module Dynflow
world.transaction_adapter.rollback if error?
end
+ steps.values.each(&:save)
update_state(error? ? :stopped : :planned)
- steps.values.each &:save
end
def skip(step)
|
First save the steps, then update the status of the execution plan
We use the persistence layer to update tasks in the Rails app. Not
having the steps available in this phase causes issues there.
Dynflow will probably get the events API sooner or later, but for now,
this fixes the current issues.
|
diff --git a/lib/chamber/namespace_set.rb b/lib/chamber/namespace_set.rb
index <HASH>..<HASH> 100644
--- a/lib/chamber/namespace_set.rb
+++ b/lib/chamber/namespace_set.rb
@@ -102,7 +102,7 @@ class NamespaceSet
# Returns a Boolean
#
def eql?(other)
- other.is_a?( Chamber::NamespaceSet) &&
+ other.is_a?( NamespaceSet) &&
self.namespaces == other.namespaces
end
|
We don't need the additional 'Chamber' namespace
|
diff --git a/test/assets/JavaScript.js b/test/assets/JavaScript.js
index <HASH>..<HASH> 100644
--- a/test/assets/JavaScript.js
+++ b/test/assets/JavaScript.js
@@ -217,6 +217,21 @@ describe('assets/JavaScript', function () {
expect(javaScript.text, 'to equal', es6Text);
});
+ it.skip('should tolerate Object spread syntax', function () {
+ var text = 'const foo = { ...bar };';
+ var javaScript = new AssetGraph.JavaScript({
+ text: text
+ });
+ expect(javaScript.parseTree, 'to satisfy', {
+ type: 'Program',
+ body: [
+ ],
+ sourceType: 'module'
+ });
+ javaScript.markDirty();
+ expect(javaScript.text, 'to equal', text);
+ });
+
it('should tolerate JSX syntax', function () {
var jsxText = 'function render() { return (<MyComponent />); }';
var javaScript = new AssetGraph.JavaScript({
|
Add test that won't work until the next esprima release
|
diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java
index <HASH>..<HASH> 100644
--- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java
+++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java
@@ -72,12 +72,13 @@ public class TraceableExecutorServiceTests {
Tracer tracer = this.tracer;
TraceKeys traceKeys = new TraceKeys();
SpanNamer spanNamer = new DefaultSpanNamer();
+ ExecutorService executorService = this.executorService;
// tag::completablefuture[]
CompletableFuture<Long> completableFuture = CompletableFuture.supplyAsync(() -> {
// perform some logic
return 1_000_000L;
- }, new TraceableExecutorService(Executors.newCachedThreadPool(),
+ }, new TraceableExecutorService(executorService,
// 'calculateTax' explicitly names the span - this param is optional
tracer, traceKeys, spanNamer, "calculateTax"));
// end::completablefuture[]
|
Added docs with an example of CompletableFuture usage - fixed executor service
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -26,6 +26,8 @@ setup(name='sparc.common',
'setuptools',
'zope.interface',
'zope.component',
+ 'zope.configuration',
+ 'zope.security'
# -*- Extra requirements: -*-
],
entry_points="""
|
update dependencies for zope.configuration and zope.security
|
diff --git a/salt/loader.py b/salt/loader.py
index <HASH>..<HASH> 100644
--- a/salt/loader.py
+++ b/salt/loader.py
@@ -895,6 +895,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
fpath, suffix = self.file_mapping[name]
self.loaded_files.append(name)
try:
+ sys.path.append(os.path.dirname(fpath))
if suffix == '.pyx':
mod = self.pyximport.load_module(name, fpath, tempfile.gettempdir())
else:
@@ -948,6 +949,8 @@ class LazyLoader(salt.utils.lazy.LazyDict):
exc_info=True
)
return mod
+ finally:
+ sys.path.pop()
if hasattr(mod, '__opts__'):
mod.__opts__.update(self.opts)
|
Adding current module directory to the sys.path in order to
avoid dependencies import errors for other modules at the same
level. (<URL>)
|
diff --git a/lib/acts_as_api/rails_renderer.rb b/lib/acts_as_api/rails_renderer.rb
index <HASH>..<HASH> 100644
--- a/lib/acts_as_api/rails_renderer.rb
+++ b/lib/acts_as_api/rails_renderer.rb
@@ -8,7 +8,7 @@ module ActsAsApi
ActionController.add_renderer :acts_as_api_jsonp do |json, options|
json = ActiveSupport::JSON.encode(json) unless json.respond_to?(:to_str)
json = "#{options[:callback]}(#{json}, #{response.status})" unless options[:callback].blank?
- self.content_type ||= options[:callback].blank? ? Mime::JSON : Mime::JS
+ self.content_type ||= options[:callback].blank? ? Mime[:json] : Mime[:js]
self.response_body = json
end
end
|
updates way to access registered mime types
|
diff --git a/html/pfappserver/root/static/admin/searches.js b/html/pfappserver/root/static/admin/searches.js
index <HASH>..<HASH> 100644
--- a/html/pfappserver/root/static/admin/searches.js
+++ b/html/pfappserver/root/static/admin/searches.js
@@ -65,7 +65,11 @@ $(function() {
}
}
}
- location.hash = url;
+ if(location.hash == url) {
+ $(window).hashchange();
+ } else {
+ location.hash = url;
+ }
return false;
});
|
Will refresh the page the simple search hash is the same as the current hash
|
diff --git a/windows.py b/windows.py
index <HASH>..<HASH> 100644
--- a/windows.py
+++ b/windows.py
@@ -45,6 +45,11 @@ class PyMouse(PyMouseMeta):
def move(self, x, y):
windll.user32.SetCursorPos(x, y)
+
+ def position(self):
+ pt = POINT()
+ windll.user32.GetCursorPos(byref(pt))
+ return pt.x, pt.y
def screen_size(self):
width = GetSystemMetrics(0)
|
copy-paste code for mouse position in Windows
|
diff --git a/lib/hard-basic-dependency-plugin.js b/lib/hard-basic-dependency-plugin.js
index <HASH>..<HASH> 100644
--- a/lib/hard-basic-dependency-plugin.js
+++ b/lib/hard-basic-dependency-plugin.js
@@ -3,6 +3,10 @@ const LoggerFactory = require('./logger-factory');
const pluginCompat = require('./util/plugin-compat');
const relateContext = require('./util/relate-context');
+let LocalModule;
+try {
+ LocalModule = require('webpack/lib/dependencies/LocalModule');
+} catch (_) {}
function flattenPrototype(obj) {
if (typeof obj === 'string') {
@@ -196,7 +200,10 @@ const freezeArgument = {
return methods.mapFreeze('Dependency', null, arg, extra);
},
localModule(arg, dependency, extra, methods) {
- // ...
+ return {
+ name: arg.name,
+ idx: arg.idx,
+ };
},
regExp(arg, dependency, extra, methods) {
return arg ? arg.source : false;
@@ -251,7 +258,7 @@ const thawArgument = {
return methods.mapThaw('Dependency', null, arg, extra);
},
localModule(arg, frozen, extra, methods) {
-
+ return new LocalModule(extra.module, arg.name, arg.idx);
},
regExp(arg, frozen, extra, methods) {
return arg ? new RegExp(arg) : arg;
|
Serialize LocalDependency's localModule member
|
diff --git a/lib/determine-basal/determine-basal.js b/lib/determine-basal/determine-basal.js
index <HASH>..<HASH> 100644
--- a/lib/determine-basal/determine-basal.js
+++ b/lib/determine-basal/determine-basal.js
@@ -220,6 +220,7 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_
});
// set eventualBG to include effect of (half of remaining) carbs
console.error("PredBGs:",JSON.stringify(predBGs));
+ rT.predBGs = predBGs;
eventualBG = Math.round(predBGs[predBGs.length-1]);
rT.eventualBG = eventualBG;
minPredBG = Math.min(minPredBG, eventualBG);
|
write predBGs to rT object
|
diff --git a/spec/integration/installation_spec.rb b/spec/integration/installation_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/integration/installation_spec.rb
+++ b/spec/integration/installation_spec.rb
@@ -1,6 +1,6 @@
require 'integration_spec_helper'
-describe 'cap install', slow: true do
+describe 'cap install' do
context 'with defaults' do
before :all do
|
include installation integration tests in main suite run
|
diff --git a/openquake/baselib/parallel.py b/openquake/baselib/parallel.py
index <HASH>..<HASH> 100644
--- a/openquake/baselib/parallel.py
+++ b/openquake/baselib/parallel.py
@@ -445,6 +445,8 @@ class IterResult(object):
elif isinstance(result, Result):
val = result.get()
self.received.append(len(result.pik))
+ if hasattr(result, 'nbytes'):
+ nbytes +=result.nbytes
else: # this should never happen
raise ValueError(result)
if OQ_DISTRIBUTE == 'processpool' and sys.platform != 'darwin':
@@ -462,6 +464,9 @@ class IterResult(object):
logging.info('Received %s from %d outputs in %d seconds, biggest '
'output=%s', humansize(tot), len(self.received),
time.time() - t0, humansize(max_per_output))
+ if nbytes:
+ logging.info('Received nbytes %s',
+ {k: humansize(v) for k, v in nbytes.items()})
def save_task_info(self, mon, mem_gb):
if self.hdf5:
|
Logged the received sizes
Former-commit-id: 0c<I>eb3bb<I>fac<I>dc<I>d<I>ad<I>cb9b8
|
diff --git a/src/ansiblelint/runner.py b/src/ansiblelint/runner.py
index <HASH>..<HASH> 100644
--- a/src/ansiblelint/runner.py
+++ b/src/ansiblelint/runner.py
@@ -83,13 +83,19 @@ class Runner:
files: List[Lintable] = list()
matches: List[MatchError] = list()
+ # remove exclusions
+ for lintable in self.lintables.copy():
+ if self.is_excluded(str(lintable.path.resolve())):
+ _logger.debug("Excluded %s", lintable)
+ self.lintables.remove(lintable)
+
# -- phase 1 : syntax check in parallel --
def worker(lintable: Lintable) -> List[MatchError]:
return AnsibleSyntaxCheckRule._get_ansible_syntax_check_matches(lintable)
# playbooks: List[Lintable] = []
for lintable in self.lintables:
- if self.is_excluded(str(lintable.path.resolve())) or lintable.kind != 'playbook':
+ if lintable.kind != 'playbook':
continue
files.append(lintable)
|
Remove exclusions from start
Fixed bug where ansible-lint --exclude foo.yml foo.yml may endup
processing the file.
|
diff --git a/drivers/javascript/rethinkdb/net/connection.js b/drivers/javascript/rethinkdb/net/connection.js
index <HASH>..<HASH> 100644
--- a/drivers/javascript/rethinkdb/net/connection.js
+++ b/drivers/javascript/rethinkdb/net/connection.js
@@ -295,7 +295,11 @@ rethinkdb.Connection.prototype.recv_ = function(data) {
break;
case Response.StatusCode.SUCCESS_EMPTY:
delete this.outstandingQueries_[response.getToken()]
- if (request.callback) request.callback();
+ if (request.iterate) {
+ if (request.done) request.done();
+ } else {
+ if (request.callback) request.callback();
+ }
break;
case Response.StatusCode.SUCCESS_STREAM:
delete this.outstandingQueries_[response.getToken()]
|
js client, fixes bug for michel
|
diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php
index <HASH>..<HASH> 100644
--- a/lib/outputrenderers.php
+++ b/lib/outputrenderers.php
@@ -1958,7 +1958,7 @@ class core_renderer extends renderer_base {
}
if ($table->rotateheaders) {
// we need to wrap the heading content
- $heading->text = $this->output_tag('span', '', $heading->text);
+ $heading->text = $this->output_tag('span', null, $heading->text);
}
$attributes = array(
|
NOBUG: Fix use of output_tag() causing warnings here and there.
|
diff --git a/lib/discordrb/commands/command_bot.rb b/lib/discordrb/commands/command_bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/commands/command_bot.rb
+++ b/lib/discordrb/commands/command_bot.rb
@@ -82,7 +82,13 @@ module Discordrb::Commands
end
def command(name, attributes = {}, &block)
- @commands[name] = Command.new(name, attributes, &block)
+ if name.is_a? Array
+ new_command = Command.new(name[0], attributes, &block)
+ name.each { |n| @commands[n] = new_command }
+ new_command
+ else
+ @commands[name] = Command.new(name, attributes, &block)
+ end
end
def execute_command(name, event, arguments, chained = false)
|
Add command aliases to CommandBot
|
diff --git a/flask_oauthlib/client.py b/flask_oauthlib/client.py
index <HASH>..<HASH> 100644
--- a/flask_oauthlib/client.py
+++ b/flask_oauthlib/client.py
@@ -292,10 +292,10 @@ class OAuthRemoteApp(object):
attr = getattr(self, '_%s' % key)
if attr:
return attr
- if default is not False and not self.app_key:
- # since it has no app_key, use the original property
- # YES, it is `attr`, not default
- return attr
+ if not self.app_key:
+ if default is not False:
+ return default
+ return None
app = self.oauth.app or current_app
config = app.config[self.app_key]
if default is not False:
|
Fix client property. #<I>
|
diff --git a/lib/ohai/mixin/dmi_decode.rb b/lib/ohai/mixin/dmi_decode.rb
index <HASH>..<HASH> 100644
--- a/lib/ohai/mixin/dmi_decode.rb
+++ b/lib/ohai/mixin/dmi_decode.rb
@@ -34,9 +34,9 @@ module ::Ohai::Mixin::DmiDecode
return "vmware"
when /Manufacturer: Xen/
return "xen"
- when /Product Name: VirtualBox/
+ when /Product.*: VirtualBox/
return "vbox"
- when /Product Name: OpenStack/
+ when /Product.*: OpenStack/
return "openstack"
when /Manufacturer: QEMU|Product Name: (KVM|RHEV)/
return "kvm"
|
Update the DMI decode mixin for Solaris
Linux / BSD use 'Product Name:' while Solaris uses 'Product:' Product.*: should be just fine
|
diff --git a/Tests/app/Resources/config.php b/Tests/app/Resources/config.php
index <HASH>..<HASH> 100644
--- a/Tests/app/Resources/config.php
+++ b/Tests/app/Resources/config.php
@@ -61,7 +61,13 @@ $container->loadFromExtension('doctrine', array(
'orm' => array(
'auto_mapping' => true
),
- 'dbal' => array()
+ 'dbal' => array(
+ 'connections' => array(
+ 'default' => array(
+ 'driver' => 'pdo_sqlite',
+ )
+ )
+ )
));
$container->loadFromExtension(
'mink',
|
fix PDOException "could not find driver" when running tests
|
diff --git a/wafer/schedule/admin.py b/wafer/schedule/admin.py
index <HASH>..<HASH> 100644
--- a/wafer/schedule/admin.py
+++ b/wafer/schedule/admin.py
@@ -35,6 +35,9 @@ class SlotAdminForm(forms.ModelForm):
class SlotAdmin(admin.ModelAdmin):
form = SlotAdminForm
+ list_display = ('__unicode__', 'end_time')
+ list_editable = ('end_time',)
+
admin.site.register(Slot, SlotAdmin)
admin.site.register(Venue)
|
Add end_time as editable on the slot list view to make tweaking times easier
|
diff --git a/admin/index.php b/admin/index.php
index <HASH>..<HASH> 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -249,7 +249,7 @@
}
require_once($CFG->libdir.'/statslib.php');
if (!stats_upgrade_for_roles_wrapper()) {
- error('Couldn\'t upgrade the stats tables to use the new roles system');
+ notify('Couldn\'t upgrade the stats tables to use the new roles system');
}
if (!update_capabilities()) {
error('Had trouble upgrading the core capabilities for the Roles System');
|
DOn't terminate upgrade if stats didn't work
|
diff --git a/skosprovider/registry.py b/skosprovider/registry.py
index <HASH>..<HASH> 100644
--- a/skosprovider/registry.py
+++ b/skosprovider/registry.py
@@ -35,7 +35,7 @@ class Registry:
If keyword ids is present, get only the providers with this id.
'''
if not 'ids' in kwargs:
- return self.providers.values()
+ return list(self.providers.values())
else:
return [self.providers[k] for k in self.providers.keys()
if k in kwargs['ids']]
|
Fix for py<I>.
Fix the unit tests for get_providers on py<I>. Makes all test succeed
again.
|
diff --git a/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java b/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java
+++ b/src/main/java/com/jayway/maven/plugins/android/AbstractAndroidMojo.java
@@ -211,7 +211,7 @@ public abstract class AbstractAndroidMojo extends AbstractMojo {
/**
* Generates R.java into a different package.
*
- * @parameter
+ * @parameter expression="${android.customPackage}"
*/
protected String customPackage;
|
Allow setting -Dandroid.customPackage from command line.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -199,7 +199,8 @@ module.exports = function(pc, opts) {
function completeConnection() {
// Clean any cached media types now that we have potentially new remote description
if (pc.__mediaTypes) {
- delete pc.__mediaTypes;
+ // Set defined as opposed to delete, for compatibility purposes
+ pc.__mediaTypes = undefined;
}
if (VALID_RESPONSE_STATES.indexOf(pc.signalingState) >= 0) {
|
Set __mediaTypes to undefined as opposed to delete
|
diff --git a/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php b/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php
index <HASH>..<HASH> 100644
--- a/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php
+++ b/rules/generic/src/NodeTypeAnalyzer/CallTypeAnalyzer.php
@@ -80,9 +80,12 @@ final class CallTypeAnalyzer
{
$classReflection = $this->reflectionProvider->getClass($className);
- /** @var string $methodName */
$methodName = $this->nodeNameResolver->getName($node->name);
+ if (! $methodName) {
+ return [];
+ }
+
$scope = $node->getAttribute(AttributeKey::SCOPE);
if (! $scope instanceof Scope) {
return [];
|
Fix CallTypeAnalyzer when methodName is null (#<I>)
|
diff --git a/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java b/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java
index <HASH>..<HASH> 100644
--- a/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java
+++ b/ultraviewpager/src/main/java/com/tmall/ultraviewpager/UltraViewPagerAdapter.java
@@ -49,7 +49,7 @@ class UltraViewPagerAdapter extends PagerAdapter {
void resetPosition();
}
- private static final int INFINITE_RATIO = 4;
+ private static final int INFINITE_RATIO = 400;
public static final String MULTISCR_TAG = "multi_scr_tag_";
private PagerAdapter adapter;
|
Update infinite ratio to <I>
|
diff --git a/eulfedora/server.py b/eulfedora/server.py
index <HASH>..<HASH> 100644
--- a/eulfedora/server.py
+++ b/eulfedora/server.py
@@ -68,7 +68,6 @@ from eulfedora.models import DigitalObject
from eulfedora.util import AuthorizingServerConnection, \
RelativeServerConnection, parse_rdf, parse_xml_object, RequestFailed
from eulfedora.xml import SearchResults, NewPids
-from eulfedora import cryptutil
logger = logging.getLogger(__name__)
@@ -152,6 +151,7 @@ class Repository(object):
if username is None and password is None:
try:
from django.conf import settings
+ from eulfedora import cryptutil
if request is not None and request.user.is_authenticated() and \
FEDORA_PASSWORD_SESSION_KEY in request.session:
|
only import cryptutil when we attempt to import django settings, so that Repository can be used without django installed
|
diff --git a/src/com/qiniu/resumable/ResumableIO.java b/src/com/qiniu/resumable/ResumableIO.java
index <HASH>..<HASH> 100644
--- a/src/com/qiniu/resumable/ResumableIO.java
+++ b/src/com/qiniu/resumable/ResumableIO.java
@@ -138,17 +138,18 @@ public class ResumableIO {
ret.onFailure(e);
return;
}
+
put(uptoken, key, isa, extra, new JSONObjectRet() {
@Override
public void onSuccess(JSONObject obj) {
- ret.onSuccess(obj);
isa.close();
+ ret.onSuccess(obj);
}
@Override
public void onFailure(Exception ex) {
- ret.onFailure(ex);
isa.close();
+ ret.onFailure(ex);
}
});
}
|
update resumable io putfile, close inputstream first
|
diff --git a/tests/test_decompressor.py b/tests/test_decompressor.py
index <HASH>..<HASH> 100644
--- a/tests/test_decompressor.py
+++ b/tests/test_decompressor.py
@@ -219,7 +219,7 @@ class TestDecompressor_decompress(unittest.TestCase):
cctx = zstd.ZstdCompressor(write_content_size=False)
frame = cctx.compress(source)
- dctx = zstd.ZstdDecompressor(max_window_size=1)
+ dctx = zstd.ZstdDecompressor(max_window_size=2**zstd.WINDOWLOG_MIN)
with self.assertRaisesRegexp(
zstd.ZstdError, 'decompression error: Frame requires too much memory'):
|
tests: pass actual minimum window size
zstd <I> is more strict about what values it accepts. 1 is no longer
accepted.
|
diff --git a/bokeh/charts/builder.py b/bokeh/charts/builder.py
index <HASH>..<HASH> 100644
--- a/bokeh/charts/builder.py
+++ b/bokeh/charts/builder.py
@@ -488,7 +488,7 @@ class Builder(HasProps):
def collect_attr_kwargs(self):
attrs = set(self.default_attributes.keys()) - set(
- self.__class__.default_attributes.keys())
+ super(self.__class__, self).default_attributes)
return attrs
def get_group_kwargs(self, group, attrs):
|
fix collect_attr_kwargs so it really checks the super class for extra group kwrgs
|
diff --git a/provision/docker/docker.go b/provision/docker/docker.go
index <HASH>..<HASH> 100644
--- a/provision/docker/docker.go
+++ b/provision/docker/docker.go
@@ -225,6 +225,10 @@ func start(app provision.App, imageId string, w io.Writer) (*container, error) {
if err != nil {
return nil, err
}
+ err = c.attach(w)
+ if err != nil {
+ return nil, err
+ }
err = c.setImage(imageId)
if err != nil {
return nil, err
diff --git a/provision/docker/docker_test.go b/provision/docker/docker_test.go
index <HASH>..<HASH> 100644
--- a/provision/docker/docker_test.go
+++ b/provision/docker/docker_test.go
@@ -667,6 +667,8 @@ func (s *S) TestStart(c *gocheck.C) {
c.Assert(err, gocheck.IsNil)
c.Assert(cont2.Image, gocheck.Equals, imageId)
c.Assert(cont2.Status, gocheck.Equals, "running")
+ args := []string{"attach", id}
+ c.Assert(fexec.ExecutedCmd("docker", args), gocheck.Equals, true)
}
func (s *S) TestContainerRunCmdError(c *gocheck.C) {
|
docker: attaching the container on start.
|
diff --git a/Vpc/Mail/HtmlParser.php b/Vpc/Mail/HtmlParser.php
index <HASH>..<HASH> 100644
--- a/Vpc/Mail/HtmlParser.php
+++ b/Vpc/Mail/HtmlParser.php
@@ -75,6 +75,7 @@ class Vpc_Mail_HtmlParser
);
$appendTags = array();
+ if (!isset($attributes['style'])) $attributes['style'] = '';
foreach ($this->_styles as $s) {
if (self::_matchesStyle($stack, $s)) {
$appendTags = array();
@@ -97,6 +98,8 @@ class Vpc_Mail_HtmlParser
} else if ($value != 'left') {
$attributes['align'] = $value;
}
+ } else {
+ $attributes['style'] .= "$style: $value; ";
}
}
}
|
support any styles in html styles, backport
|
diff --git a/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java b/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java
index <HASH>..<HASH> 100644
--- a/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java
+++ b/connector/src/main/java/org/jboss/as/connector/services/ResourceAdapterActivatorService.java
@@ -106,7 +106,7 @@ public final class ResourceAdapterActivatorService extends AbstractResourceAdapt
ConnectorServices.RESOURCE_ADAPTER_SERVICE_PREFIX.append(this.value.getDeployment().getDeploymentName()));
context.getChildTarget()
- .addService(ServiceName.of(value.getDeployment().getDeploymentName()),
+ .addService(ConnectorServices.RESOURCE_ADAPTER_SERVICE_PREFIX.append(value.getDeployment().getDeploymentName()),
new ResourceAdapterService(value.getDeployment().getResourceAdapter())).setInitialMode(Mode.ACTIVE)
.install();
DEPLOYMENT_CONNECTOR_LOGGER.debugf("Starting service %s", ConnectorServices.RESOURCE_ADAPTER_ACTIVATOR_SERVICE);
|
AS7-<I> JCA seems to be installing services with no prefix
|
diff --git a/js/test/test_base.js b/js/test/test_base.js
index <HASH>..<HASH> 100644
--- a/js/test/test_base.js
+++ b/js/test/test_base.js
@@ -28,7 +28,7 @@ describe ('ccxt base code', () => {
assert.strictEqual (ccxt.safeFloat ({}, 'float', 0), 0)
})
- it ('setTimeout_safe is working', (done) => {
+ it.skip ('setTimeout_safe is working', (done) => {
const start = Date.now ()
const calls = []
|
skipping setTimeout_safe test on appveyor
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.