diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/lib/server.js b/lib/server.js
index <HASH>..<HASH> 100644
--- a/lib/server.js
+++ b/lib/server.js
@@ -303,7 +303,7 @@ function Server(options) {
log.trace('%s shutdown', c.ldap.id);
});
c.addListener('error', function (err) {
- log.warn('%s unexpected connection error', c.ldap.id, err);
+ log.error('%s unexpected connection error', c.ldap.id, err);
c.destroy();
});
c.addListener('close', function (had_err) {
@@ -377,7 +377,7 @@ function Server(options) {
}
if (err) {
- log.trace('%s sending error: %s', req.logId, err.stack || err);
+ log.error('%s sending error: %s', req.logId, err.stack || err);
sendError(err);
return after();
}
|
Log errors with error log level instead of trace.
|
diff --git a/core/server/services/members/api.js b/core/server/services/members/api.js
index <HASH>..<HASH> 100644
--- a/core/server/services/members/api.js
+++ b/core/server/services/members/api.js
@@ -74,11 +74,14 @@ function getStripePaymentConfig() {
return null;
}
+ const webhookHandlerUrl = new URL('/members/webhooks/stripe', siteUrl);
+
return {
publicKey: stripePaymentProcessor.config.public_token,
secretKey: stripePaymentProcessor.config.secret_token,
checkoutSuccessUrl: siteUrl,
checkoutCancelUrl: siteUrl,
+ webhookHandlerUrl: webhookHandlerUrl.href,
product: stripePaymentProcessor.config.product,
plans: stripePaymentProcessor.config.plans,
appInfo: {
diff --git a/core/server/web/site/app.js b/core/server/web/site/app.js
index <HASH>..<HASH> 100644
--- a/core/server/web/site/app.js
+++ b/core/server/web/site/app.js
@@ -155,6 +155,7 @@ module.exports = function setupSiteApp(options = {}) {
res.end(err.message);
}
});
+ siteApp.post('/members/webhooks/stripe', membersService.api.middleware.handleStripeWebhook);
siteApp.use(async function (req, res, next) {
if (!labsService.isSet('members')) {
req.member = null;
|
Wired up the members webhook handler endpoint
no-issue
|
diff --git a/out_response.js b/out_response.js
index <HASH>..<HASH> 100644
--- a/out_response.js
+++ b/out_response.js
@@ -27,6 +27,7 @@ var inherits = require('util').inherits;
var errors = require('./errors');
var States = require('./reqres_states');
+/*eslint max-statements: [2, 40]*/
function TChannelOutResponse(id, options) {
options = options || {};
var self = this;
|
linting: [out_response] comply with max-statements rule
|
diff --git a/src/components/core/core.js b/src/components/core/core.js
index <HASH>..<HASH> 100644
--- a/src/components/core/core.js
+++ b/src/components/core/core.js
@@ -218,11 +218,9 @@ class Core extends UIObject {
this.$el.append(style)
this.$el.append(this.mediaControl.render().el)
- this.$el.ready(() => {
- this.options.width = this.options.width || this.$el.width()
- this.options.height = this.options.height || this.$el.height()
- this.updateSize()
- })
+ this.options.width = this.options.width || this.$el.width()
+ this.options.height = this.options.height || this.$el.height()
+ this.updateSize()
return this
}
|
core: remove ready call to run update size imediatelly
|
diff --git a/src/tile_source.js b/src/tile_source.js
index <HASH>..<HASH> 100644
--- a/src/tile_source.js
+++ b/src/tile_source.js
@@ -216,9 +216,9 @@ export class MapboxFormatTileSource extends NetworkTileSource {
this.VectorTile = require('vector-tile').VectorTile; // Mapbox vector tile lib, forked to add GeoJSON output
}
- parseTile (tile) {
+ parseTile (tile, response) {
// Convert Mapbox vector tile to GeoJSON
- var data = new Uint8Array(tile.xhr.response);
+ var data = new Uint8Array(response);
var buffer = new this.Protobuf(data);
tile.data = new this.VectorTile(buffer);
tile.layers = tile.data.toGeoJSON();
|
fix Mapbox tile source to work with XHR wrapper
|
diff --git a/msgpackstream/backend/pyc/stream.py b/msgpackstream/backend/pyc/stream.py
index <HASH>..<HASH> 100644
--- a/msgpackstream/backend/pyc/stream.py
+++ b/msgpackstream/backend/pyc/stream.py
@@ -132,7 +132,7 @@ class UnpackerIterator(object):
-def unpack(instream, buffersize=4000, parsers=[]):
+def unpack(instream, buffersize=5000, parsers=[]):
'''``
Creates an iterator instance for the unpacker
:param instream:
diff --git a/msgpackstream/backend/python/stream.py b/msgpackstream/backend/python/stream.py
index <HASH>..<HASH> 100644
--- a/msgpackstream/backend/python/stream.py
+++ b/msgpackstream/backend/python/stream.py
@@ -496,7 +496,7 @@ class StreamUnpacker():
-def unpack(instream, buffersize=4000, parsers=[]):
+def unpack(instream, buffersize=5000, parsers=[]):
'''
Creates an iterator instance for the unpacker
:param instream:
|
increased default buffersize to <I>
|
diff --git a/lib/kafka/consumer.rb b/lib/kafka/consumer.rb
index <HASH>..<HASH> 100644
--- a/lib/kafka/consumer.rb
+++ b/lib/kafka/consumer.rb
@@ -400,8 +400,10 @@ module Kafka
operation.execute
rescue NoPartitionsToFetchFrom
- @logger.warn "There are no partitions to fetch from, sleeping for #{max_wait_time}s"
- sleep max_wait_time
+ backoff = max_wait_time > 0 ? max_wait_time : 1
+
+ @logger.warn "There are no partitions to fetch from, sleeping for #{backoff}s"
+ sleep backoff
retry
rescue OffsetOutOfRange => e
|
Guard against max_wait_time being zero
|
diff --git a/streamfield_tools/blocks/struct_block.py b/streamfield_tools/blocks/struct_block.py
index <HASH>..<HASH> 100644
--- a/streamfield_tools/blocks/struct_block.py
+++ b/streamfield_tools/blocks/struct_block.py
@@ -77,12 +77,12 @@ class MultiRenditionStructBlock(StructBlock):
rendition = self._rendition_set_config.get(
value['render_as']
)
+ context = self.get_context(value)
+ context['self'] = value
+ context['image_rendition'] = rendition.image_rendition or 'original'
+ context['addl_classes'] = value['addl_classes']
return rendition.template.render(
- {
- 'self': value,
- 'image_rendition': rendition.image_rendition or 'original',
- 'addl_classes': value['addl_classes']
- }
+ context
)
def to_python(self, value):
@@ -123,11 +123,8 @@ class RenditionAwareStructBlock(RenditionMixIn, StructBlock):
except AttributeError:
template = self.meta.template
- return render_to_string(
- template,
- {
- 'self': value,
- 'image_rendition': self.rendition.image_rendition
- or 'original'
- }
- )
+
+ context = self.get_context(value)
+ context['self'] = value
+ context['image_rendition'] = rendition.image_rendition or 'original'
+ return render_to_string(template, context)
|
added context to struct block rendering so 'get_context' works for subclasses
|
diff --git a/tests/test_write_readback.py b/tests/test_write_readback.py
index <HASH>..<HASH> 100755
--- a/tests/test_write_readback.py
+++ b/tests/test_write_readback.py
@@ -89,8 +89,9 @@ class TestWriteReadbackCpythonMatlab(unittest.TestCase):
self.assertEqual(a, b)
def assert_equal_numpy(self, a, b):
- self.assertTrue(type(a) == type(b) and a.dtype == b.dtype
- and a.shape == b.shape and np.all(a == b))
+ self.assertTrue(type(a) == type(b) and a.dtype == b.dtype \
+ and a.shape == b.shape and np.all((a == b) \
+ | (np.isnan(a) & np.isnan(b))))
def test_None(self):
data = None
|
Fixed issue in test where NaN's were causing equality tests to fail.
|
diff --git a/controller/frontend/src/Controller/Frontend/Basket/Default.php b/controller/frontend/src/Controller/Frontend/Basket/Default.php
index <HASH>..<HASH> 100644
--- a/controller/frontend/src/Controller/Frontend/Basket/Default.php
+++ b/controller/frontend/src/Controller/Frontend/Basket/Default.php
@@ -245,8 +245,8 @@ class Controller_Frontend_Basket_Default
if( empty( $prices ) )
{
- $productItem = $productManager->getItem( $product->getProductId(), array( 'price' ) );
- $prices = $productItem->getRefItems( 'price', 'default' );
+ $parentItem = $productManager->getItem( $product->getProductId(), array( 'price' ) );
+ $prices = $parentItem->getRefItems( 'price', 'default' );
}
$priceManager = MShop_Factory::createManager( $context, 'price' );
|
Fixes stock level check for selection product variants
|
diff --git a/Command/AtoumCommand.php b/Command/AtoumCommand.php
index <HASH>..<HASH> 100644
--- a/Command/AtoumCommand.php
+++ b/Command/AtoumCommand.php
@@ -80,7 +80,7 @@ EOF
}
foreach ($directories as $directory) {
- $runner->addTestAllDirectory($directory);
+ $runner->getRunner()->addTestsFromDirectory($directory);
}
}
|
Fix use of deprecated addTestAllDirectory in AtoumCommand
|
diff --git a/tests/integ/test_basic.py b/tests/integ/test_basic.py
index <HASH>..<HASH> 100644
--- a/tests/integ/test_basic.py
+++ b/tests/integ/test_basic.py
@@ -56,7 +56,7 @@ def test_stream_creation(engine):
assert "arn" in StreamCreation.Meta.stream
-def test_model_overlap(session, engine):
+def test_model_overlap(dynamodb, engine):
"""Two models backed by the same table, with different indexes"""
class FirstOverlap(BaseModel):
class Meta:
@@ -100,8 +100,7 @@ def test_model_overlap(session, engine):
# the test framework to allow parallel runs
"TableName": FirstOverlap.Meta.table_name
}
- client = session.client("dynamodb")
- client.create_table(**combined_table)
+ dynamodb.create_table(**combined_table)
# Now, both of these binds should see the particular subset of indexes/attribute names that they care about
engine.bind(FirstOverlap)
|
renamed client fixture in integ test
|
diff --git a/lib/data_mapper/relationship.rb b/lib/data_mapper/relationship.rb
index <HASH>..<HASH> 100644
--- a/lib/data_mapper/relationship.rb
+++ b/lib/data_mapper/relationship.rb
@@ -124,9 +124,7 @@ module DataMapper
@options = options.to_hash
@source_model = source_model
- @target_model = target_model || options.fetch(:model)
- @source_key = Array(options[:source_key] || default_source_key).freeze
- @target_key = Array(options[:target_key] || default_target_key).freeze
+ @target_model = target_model
@through = options[:through]
@via = options[:via]
@@ -134,6 +132,8 @@ module DataMapper
@min = options.fetch(:min, 1)
@max = options.fetch(:max, 1)
+
+ initialize_keys
end
def finalize(mapper_registry)
@@ -157,6 +157,11 @@ module DataMapper
DEFAULT_SOURCE_KEY = [ :id ].freeze
DEFAULT_TARGET_KEY = [].freeze
+ def initialize_keys
+ @source_key = Array(options[:source_key] || default_source_key).freeze
+ @target_key = Array(options[:target_key] || default_target_key).freeze
+ end
+
# Returns default name of the source key
#
# @return [Symbol,nil]
|
Simplify Relationship#initialize
|
diff --git a/solvebio/cli/ipython.py b/solvebio/cli/ipython.py
index <HASH>..<HASH> 100644
--- a/solvebio/cli/ipython.py
+++ b/solvebio/cli/ipython.py
@@ -8,6 +8,7 @@ def launch_ipython_shell(args): # pylint: disable=unused-argument
except ImportError:
print("The SolveBio Python shell requires IPython.\n"
"To install, type: 'pip install ipython'")
+ return False
try:
# see if we're already inside IPython
|
make sure to return after the ipython cli fails to import ipython
|
diff --git a/test/tools/javac/nio/compileTest/CompileTest.java b/test/tools/javac/nio/compileTest/CompileTest.java
index <HASH>..<HASH> 100644
--- a/test/tools/javac/nio/compileTest/CompileTest.java
+++ b/test/tools/javac/nio/compileTest/CompileTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
* @test
* @bug 6906175 6915476 6915497 7006564
* @summary Path-based JavaFileManager
- * @compile -g HelloPathWorld.java
+ * @compile -g CompileTest.java HelloPathWorld.java
* @run main CompileTest
*/
|
<I>: tools/javac/nio/CompileTest failing in nightly test
Reviewed-by: mcimadamore
|
diff --git a/spec/video/where_spec.rb b/spec/video/where_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/video/where_spec.rb
+++ b/spec/video/where_spec.rb
@@ -27,7 +27,7 @@ describe 'Yt::Video.where', :server do
end
it 'makes as many HTTP requests as the number of videos divided by 50', requests: 2 do
- Yt::Video.where(id: video_ids).map &:id
+ Yt::Video.where(id: video_ids.drop(1)).map &:id
end
it 'makes as many HTTP requests as the number of videos divided by 50 to calculate the size', requests: 2 do
|
Fix failing test
To count the correct number of requests, don't reuse exactly the
same request as the other test.
|
diff --git a/src/main/java/com/dlsc/preferencesfx/view/CategoryPresenter.java b/src/main/java/com/dlsc/preferencesfx/view/CategoryPresenter.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/dlsc/preferencesfx/view/CategoryPresenter.java
+++ b/src/main/java/com/dlsc/preferencesfx/view/CategoryPresenter.java
@@ -32,11 +32,24 @@ public class CategoryPresenter implements Presenter {
*/
@Override
public void initializeViewParts() {
+ initializeTranslation();
initializeForm(categoryView.form);
categoryView.initializeFormRenderer();
}
/**
+ * Sets up a binding of the TranslationService on the model, so that this Category's title gets
+ * translated properly according to the TranslationService used.
+ */
+ private void initializeTranslation() {
+ model.translationServiceProperty().addListener((observable, oldValue, newValue) -> {
+ categoryModel.translate();
+ // listen for i18n changes in the TranslationService for this Category
+ newValue.addListener(() -> categoryModel.translate());
+ });
+ }
+
+ /**
* Fills the {@link Form} with {@link Group} and {@link Setting} of this {@link Category}.
*
* @param form the form to be initialized
|
applied changes from i<I>n branch
|
diff --git a/javascript/webdriver/stacktrace.js b/javascript/webdriver/stacktrace.js
index <HASH>..<HASH> 100644
--- a/javascript/webdriver/stacktrace.js
+++ b/javascript/webdriver/stacktrace.js
@@ -562,11 +562,14 @@ webdriver.stacktrace.parseLongFirefoxFrame_ = function(frameStr) {
* V8 prepends the string representation of an error to its stack trace.
* This function trims the string so that the stack trace can be parsed
* consistently with the other JS engines.
- * @param {!(Error|goog.testing.JsUnitException)} error The error.
+ * @param {(Error|goog.testing.JsUnitException)} error The error.
* @return {string} The stack trace string.
* @private
*/
webdriver.stacktrace.getStack_ = function(error) {
+ if (!error) {
+ return '';
+ }
var stack = error.stack || error.stackTrace || '';
var errorStr = error + '\n';
if (goog.string.startsWith(stack, errorStr)) {
|
Loosen input type to webdriver.stacktrace.getStack_ to account
for an rare condition in FF <I>+ where the Error() constructor
returns undefined (not sure what causes it, just know it happens)
|
diff --git a/pymux/main.py b/pymux/main.py
index <HASH>..<HASH> 100644
--- a/pymux/main.py
+++ b/pymux/main.py
@@ -13,7 +13,6 @@ from prompt_toolkit.interface import CommandLineInterface
from prompt_toolkit.key_binding.vi_state import InputMode, ViState
from prompt_toolkit.layout.screen import Size
from prompt_toolkit.terminal.vt100_output import Vt100_Output, _get_size
-from prompt_toolkit.utils import Callback
from .arrangement import Arrangement, Pane, Window
from .commands.commands import handle_command, call_command_handler
@@ -390,6 +389,12 @@ class Pymux(object):
input=input,
eventloop=self.eventloop)
+ # Set render postpone time. (.1 instead of 0).
+ # This small change ensures that if for a split second a process
+ # outputs a lot of information, we don't give the highest priority to
+ # rendering output. (Nobody reads that fast in real-time.)
+ cli.max_render_postpone_time = .1 # Second.
+
# Hide message when a key has been pressed.
def key_pressed():
self.get_client_state(cli).message = None
|
Set render postpone time to <I> (This improves the performance.)
|
diff --git a/biz/webui/cgi-bin/util.js b/biz/webui/cgi-bin/util.js
index <HASH>..<HASH> 100644
--- a/biz/webui/cgi-bin/util.js
+++ b/biz/webui/cgi-bin/util.js
@@ -16,6 +16,10 @@ exports.getClientId = function() {
};
exports.getServerInfo = function(req) {
+ var baseDir;
+ if (!config.networkMode && !config.pluginsMode) {
+ baseDir = config.baseDirHash;
+ }
var info = {
pid: PID,
pInfo: proc,
@@ -30,7 +34,7 @@ exports.getServerInfo = function(req) {
rulesMode: config.rulesMode,
strictMode: config.strict,
multiEnv: config.multiEnv,
- baseDir: config.baseDirHash,
+ baseDir: baseDir,
username: config.username,
nodeVersion: process.version,
latestVersion: properties.getLatestVersion('latestVersion'),
|
refactor: hide baseDir in network or plugins mode
|
diff --git a/vendor/Devvoh/Fluid/Bootstrap.php b/vendor/Devvoh/Fluid/Bootstrap.php
index <HASH>..<HASH> 100644
--- a/vendor/Devvoh/Fluid/Bootstrap.php
+++ b/vendor/Devvoh/Fluid/Bootstrap.php
@@ -51,9 +51,15 @@ spl_autoload_register(function ($class) {
*/
spl_autoload_register(function ($class) {
if (strpos($class, '_model') !== false) {
+ // Remove _model from the end in the most concrete way possible (str_replace might remove too many,
+ // and rtrim sometimes removed too much as well).
$classParts = explode('_', $class);
- $modelName = $classParts[0];
- $modelType = $classParts[1];
+ $lastPart = count($classParts) - 1;
+ if ($classParts[$lastPart] == 'model') {
+ unset($classParts[$lastPart]);
+ }
+ $modelName = implode('_', $classParts);
+
foreach (\Devvoh\Fluid\App::getModules() as $module) {
$path = $module['path'] . DS . 'model' . DS . $modelName . '.php';
if (is_file($path)) {
|
Fixed entity/model autoloader so it can load under_scored models properly.
|
diff --git a/service/cloudhsm/examples_test.go b/service/cloudhsm/examples_test.go
index <HASH>..<HASH> 100644
--- a/service/cloudhsm/examples_test.go
+++ b/service/cloudhsm/examples_test.go
@@ -21,7 +21,7 @@ func ExampleCloudHSM_AddTagsToResource() {
params := &cloudhsm.AddTagsToResourceInput{
ResourceArn: aws.String("String"), // Required
TagList: []*cloudhsm.Tag{ // Required
- { // Required
+ &cloudhsm.Tag{ // Required
Key: aws.String("TagKey"), // Required
Value: aws.String("TagValue"), // Required
},
|
cloudhsm: Update client to latest
|
diff --git a/spec/unit/type_spec.rb b/spec/unit/type_spec.rb
index <HASH>..<HASH> 100755
--- a/spec/unit/type_spec.rb
+++ b/spec/unit/type_spec.rb
@@ -1,9 +1,10 @@
#! /usr/bin/env ruby
require 'spec_helper'
-
+require 'puppet_spec/compiler'
describe Puppet::Type, :unless => Puppet.features.microsoft_windows? do
include PuppetSpec::Files
+ include PuppetSpec::Compiler
it "should be Comparable" do
a = Puppet::Type.type(:notify).new(:name => "a")
@@ -131,6 +132,26 @@ describe Puppet::Type, :unless => Puppet.features.microsoft_windows? do
Puppet::Type.type(:mount).new(:name => "foo").version.should == 0
end
+ it "reports the correct path even after path is used during setup of the type" do
+ Puppet::Type.newtype(:testing) do
+ newparam(:name) do
+ isnamevar
+ validate do |value|
+ path # forces the computation of the path
+ end
+ end
+ end
+
+ ral = compile_to_ral(<<-MANIFEST)
+ class something {
+ testing { something: }
+ }
+ include something
+ MANIFEST
+
+ ral.resource("Testing[something]").path.should == "/Stage[main]/Something/Testing[something]"
+ end
+
context "resource attributes" do
let(:resource) {
resource = Puppet::Type.type(:mount).new(:name => "foo")
|
(#<I>) Add a spec test to reproduce the failure
|
diff --git a/user/view.php b/user/view.php
index <HASH>..<HASH> 100644
--- a/user/view.php
+++ b/user/view.php
@@ -230,7 +230,7 @@
' height="16" width="16" /></a>');
}
if ($user->yahoo && !isset($hiddenfields['yahooid'])) {
- print_row(get_string('yahooid').':', '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.s($user->yahoo).'&.src=pg">'.s($user->yahoo).'</a>');
+ print_row(get_string('yahooid').':', '<a href="http://edit.yahoo.com/config/send_webmesg?.target='.urlencode($user->yahoo).'&.src=pg">'.s($user->yahoo)." <img border=0 src=\"http://opi.yahoo.com/online?u=".urlencode($user->yahoo)."&m=g&t=0\" width=\"12\" height=\"12\" alt=\"\"></a>");
}
if ($user->aim && !isset($hiddenfields['aimid'])) {
print_row(get_string('aimid').':', '<a href="aim:goim?screenname='.s($user->aim).'">'.s($user->aim).'</a>');
|
Bug #<I> - add Yahoo online status to user profile; merged from MOODLE_<I>_STABLE
|
diff --git a/support/test-runner/app.js b/support/test-runner/app.js
index <HASH>..<HASH> 100644
--- a/support/test-runner/app.js
+++ b/support/test-runner/app.js
@@ -6,7 +6,8 @@
var express = require('express')
, stylus = require('stylus')
, sio = require('socket.io')
- , path = require('path');
+ , path = require('path')
+ , fs = require('fs');
/**
* App.
@@ -54,8 +55,25 @@ app.listen(3000, function () {
* Socket.IO server (single process only)
*/
-var io = sio.listen(app)
- , nicknames = {};
+var io = sio.listen(app);
+
+// override handler to simplify development
+function handler (req, res) {
+ fs.readFile(__dirname + '/../../dist/socket.io.js', 'utf8', function (err, b) {
+ if (err) {
+ res.writeHead(404);
+ res.end('Error');
+ return;
+ }
+
+ res.writeHead(200, { 'Content-Type': 'application/javascript' });
+ res.end(b);
+ });
+};
+
+io.configure(function () {
+ io.set('browser client handler', handler);
+});
io.sockets.on('connection', function (socket) {
|
Added custom client serving to serve the local repository.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -76,10 +76,6 @@ Parsing::
"""
VERSION = get_version()
-DOWNLOAD_URL = (
- 'https://github.com/downloads/andialbrecht/sqlparse/'
- 'sqlparse-%s.tar.gz' % VERSION
-)
kwargs = {}
@@ -94,7 +90,6 @@ setup(
description='Non-validating SQL parser',
author='Andi Albrecht',
author_email='albrecht.andi@gmail.com',
- download_url=DOWNLOAD_URL,
long_description=LONG_DESCRIPTION,
license='BSD',
url='https://github.com/andialbrecht/sqlparse',
|
Remove download url from setup (fixes issue<I>).
Downloads on github are disabled since December <I>.
|
diff --git a/netsnmpagent.py b/netsnmpagent.py
index <HASH>..<HASH> 100644
--- a/netsnmpagent.py
+++ b/netsnmpagent.py
@@ -136,7 +136,7 @@ class netsnmpAgent(object):
# Let libsnmpagent parse the OID
if libnsa.read_objid(
oidstr,
- ctypes.cast(ctypes.byref(oid), ctypes.POINTER(ctypes.c_ulong)),
+ ctypes.cast(ctypes.byref(oid), c_oid_p),
ctypes.byref(oid_len)
) == 0:
raise netsnmpAgentException("read_objid({0}) failed!".format(oidstr))
|
Of course one should use existing data types first...
|
diff --git a/driver/src/main/java/org/kaazing/k3po/driver/internal/ext/tls/bootstrap/TlsClientChannelSink.java b/driver/src/main/java/org/kaazing/k3po/driver/internal/ext/tls/bootstrap/TlsClientChannelSink.java
index <HASH>..<HASH> 100644
--- a/driver/src/main/java/org/kaazing/k3po/driver/internal/ext/tls/bootstrap/TlsClientChannelSink.java
+++ b/driver/src/main/java/org/kaazing/k3po/driver/internal/ext/tls/bootstrap/TlsClientChannelSink.java
@@ -318,13 +318,18 @@ public class TlsClientChannelSink extends AbstractChannelSink {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
if (tlsClientChannel.setWriteClosed()) {
- shutdownOutputOrClose(transport);
fireChannelDisconnected(tlsClientChannel);
fireChannelUnbound(tlsClientChannel);
fireChannelClosed(tlsClientChannel);
}
}
});
+ tlsHandler.getSSLEngineInboundCloseFuture().addListener(new ChannelFutureListener() {
+ @Override
+ public void operationComplete(ChannelFuture future) throws Exception {
+ shutdownOutputOrClose(transport);
+ }
+ });
chainFutures(tlsCloseFuture, tlsFuture);
}
}
|
Tls closes underlying connection on TLS handshake close
|
diff --git a/src/main/resources/js/report/report.js b/src/main/resources/js/report/report.js
index <HASH>..<HASH> 100644
--- a/src/main/resources/js/report/report.js
+++ b/src/main/resources/js/report/report.js
@@ -239,12 +239,12 @@ function adjustImageAreaSize() {
var maxWidth = $("#right_container").width();
var maxHeight;
if (srcInfoShown) {
- maxHeight = $("#right_container").height() - $("#outer_script_table_container").height() - 20;
+ maxHeight = $("#right_container").height() - $("#outer_script_table_container").height() - 40;
} else {
- maxHeight = $("#right_container").height() - 20;
+ maxHeight = $("#right_container").height() - 40;
}
if (maxHeight <= 0) {
- maxHeight = 20;
+ maxHeight = 40;
}
var areaSize = calcCaptureAreaSize(width, height, maxWidth, maxHeight);
// need to change also li elements width to reflect width change immediately
|
Don't overlap between report image and table
|
diff --git a/errors.go b/errors.go
index <HASH>..<HASH> 100644
--- a/errors.go
+++ b/errors.go
@@ -85,10 +85,8 @@ func HandleExitCoder(err error) {
}
if multiErr, ok := err.(MultiError); ok {
- for _, merr := range multiErr.Errors {
- fmt.Fprintln(ErrWriter, merr)
- }
- OsExiter(1)
+ code := handleMultiError(multiErr)
+ OsExiter(code)
return
}
@@ -97,3 +95,18 @@ func HandleExitCoder(err error) {
}
OsExiter(1)
}
+
+func handleMultiError(multiErr MultiError) int {
+ code := 1
+ for _, merr := range multiErr.Errors {
+ if multiErr2, ok := merr.(MultiError); ok {
+ code = handleMultiError(multiErr2)
+ } else {
+ fmt.Fprintln(ErrWriter, merr)
+ if exitErr, ok := merr.(ExitCoder); ok {
+ code = exitErr.ExitCode()
+ }
+ }
+ }
+ return code
+}
|
Exit with the code of ExitCoder if exists
|
diff --git a/events/facebookEvents.js b/events/facebookEvents.js
index <HASH>..<HASH> 100644
--- a/events/facebookEvents.js
+++ b/events/facebookEvents.js
@@ -21,6 +21,10 @@ function saveFacebookEvents(eventsWithVenues, row, grpIdx) {
if (!row.location) {
return;
}
+ if (!row.end_time){
+ //TODO : add more sanitization checks for end_time
+ row.end_time = utils.localTime(row.start_time).add(2, 'hours').toISOString();
+ }
eventsWithVenues.push({
id: row.id,
name: row.name,
|
fix(facebook) added null check for end_time
|
diff --git a/core-bundle/contao/dca/tl_article.php b/core-bundle/contao/dca/tl_article.php
index <HASH>..<HASH> 100644
--- a/core-bundle/contao/dca/tl_article.php
+++ b/core-bundle/contao/dca/tl_article.php
@@ -687,7 +687,7 @@ class tl_article extends Backend
$arrSections = array_merge($arrSections, $arrCustom);
}
- return array_unique($arrSections);
+ return array_values(array_unique($arrSections));
}
|
[Core] Correctly assign articles to columns (see #<I>)
|
diff --git a/lib/vagrant/vm.rb b/lib/vagrant/vm.rb
index <HASH>..<HASH> 100644
--- a/lib/vagrant/vm.rb
+++ b/lib/vagrant/vm.rb
@@ -49,11 +49,11 @@ module Vagrant
@logger.info("Loading guest: #{guest}")
if guest.is_a?(Class)
- raise Errors::VMGuestError, :_key => :invalid_class, :system => guest.to_s if !(guest <= Guest::Base)
+ raise Errors::VMGuestError, :_key => :invalid_class, :guest => guest.to_s if !(guest <= Guest::Base)
@guest = guest.new(self)
elsif guest.is_a?(Symbol)
guest_klass = Vagrant.guests.get(guest)
- raise Errors::VMGuestError, :_key => :unknown_type, :system => guest.to_s if !guest_klass
+ raise Errors::VMGuestError, :_key => :unknown_type, :guest => guest.to_s if !guest_klass
@guest = guest_klass.new(self)
else
raise Errors::VMGuestError, :unspecified
|
fix interpolation error in VMGuestError strings
|
diff --git a/includes/functions/functions_mediadb.php b/includes/functions/functions_mediadb.php
index <HASH>..<HASH> 100644
--- a/includes/functions/functions_mediadb.php
+++ b/includes/functions/functions_mediadb.php
@@ -923,7 +923,7 @@ function get_media_folders() {
$entry = $dir->read();
if (!$entry)
break;
- if (is_dir($currentFolder . $entry . "/")) {
+ if (is_dir($currentFolder . $entry)) {
// Weed out some folders we're not interested in
if ($entry != "." && $entry != ".." && $entry != "CVS" && $entry != ".svn") {
if ($currentFolder . $entry . "/" != $MEDIA_DIRECTORY . "thumbs/") {
|
FIX: is_dir() gives error with badly-formed directories when open_basedir is in effect.
|
diff --git a/lib/gscraper/version.rb b/lib/gscraper/version.rb
index <HASH>..<HASH> 100644
--- a/lib/gscraper/version.rb
+++ b/lib/gscraper/version.rb
@@ -20,5 +20,5 @@
module GScraper
# The version of GScraper
- VERSION = '0.3.1'
+ VERSION = '0.4.0'
end
|
Version bump to <I>.
|
diff --git a/tests/letter_tests.py b/tests/letter_tests.py
index <HASH>..<HASH> 100644
--- a/tests/letter_tests.py
+++ b/tests/letter_tests.py
@@ -94,7 +94,7 @@ class Letters(unittest.TestCase):
c = []
for i,b_w in enumerate(b):
w = utf8.join_letters_elementary(b_w)
- print u"%s"%w
+ print(u"%s"%w)
c.append(w)
d = map( len, b )
self.assertEqual([8,6,6],d)
|
PYTHON3 bugbear in tests
|
diff --git a/packages/ssr/src/lib/run-client.js b/packages/ssr/src/lib/run-client.js
index <HASH>..<HASH> 100644
--- a/packages/ssr/src/lib/run-client.js
+++ b/packages/ssr/src/lib/run-client.js
@@ -32,9 +32,7 @@ const makeClient = options => {
if (typeof window !== "undefined" && window.nuk) {
const acsTnlCookie = window.nuk.getCookieValue("acs_tnl");
const sacsTnlCookie = window.nuk.getCookieValue("sacs_tnl");
- if (acsTnlCookie && sacsTnlCookie) {
- networkInterfaceOptions.headers.Authorization = `Cookie acs_tnl=${acsTnlCookie};sacs_tnl=${sacsTnlCookie}`;
- }
+ networkInterfaceOptions.headers.Authorization = `Cookie acs_tnl=${acsTnlCookie};sacs_tnl=${sacsTnlCookie}`;
}
return new ApolloClient({
|
fix: revert cookie pagination fix (#<I>)
|
diff --git a/modules/core/bundle/index.js b/modules/core/bundle/index.js
index <HASH>..<HASH> 100644
--- a/modules/core/bundle/index.js
+++ b/modules/core/bundle/index.js
@@ -3,13 +3,16 @@ const LumaGL = require('./lumagl');
const deckGLCore = require('../src');
const DeckGL = require('./deckgl').default;
+const {registerLoaders, load, parse} = require('@loaders.gl/core');
/* global window, global */
const _global = typeof window === 'undefined' ? global : window;
_global.deck = _global.deck || {};
_global.luma = _global.luma || {};
+_global.loaders = _global.loaders || {};
Object.assign(_global.deck, deckGLCore, {DeckGL});
Object.assign(_global.luma, LumaGL);
+Object.assign(_global.loaders, {registerLoaders, load, parse});
module.exports = _global.deck;
|
Expose loaders.gl endpoints from the core bundle (#<I>)
|
diff --git a/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation.py b/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation.py
index <HASH>..<HASH> 100644
--- a/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation.py
+++ b/tensorflow_probability/python/experimental/mcmc/diagonal_mass_matrix_adaptation.py
@@ -293,7 +293,8 @@ def _make_momentum_distribution(running_variance_parts, state_parts,
running_variance_rank = ps.rank(variance_part)
state_rank = ps.rank(state_part)
# Pad dimensions and tile by multiplying by tf.ones to add a batch shape
- ones = tf.ones(ps.shape(state_part)[:-(state_rank - running_variance_rank)])
+ ones = tf.ones(ps.shape(state_part)[:-(state_rank - running_variance_rank)],
+ dtype=variance_part.dtype)
ones = bu.left_justified_expand_dims_like(ones, state_part)
variance_tiled = variance_part * ones
reinterpreted_batch_ndims = state_rank - batch_ndims - 1
|
Add missing dtype in `diagonal_mass_matrix_adaptation`
|
diff --git a/nitro.js b/nitro.js
index <HASH>..<HASH> 100644
--- a/nitro.js
+++ b/nitro.js
@@ -542,7 +542,6 @@ var defcat = 'all';
try {
var config = require('./config.json');
- download_history = giUtils.downloadHistory(config.download_history);
host = config.nitro.host;
api_key = config.nitro.api_key;
mediaSet = config.nitro.mediaset;
@@ -672,6 +671,10 @@ options.on('run',function(argv,options){
});
var o = options.parseSystem();
+if (!showAll && config.download_history) {
+ download_history = giUtils.downloadHistory(config.download_history);
+}
+
if (partner_pid) {
query.add(api.fProgrammesPartnerPid,partner_pid)
.add(api.mProgrammesAvailability)
|
nitro; only load download_history if needed
|
diff --git a/fsquery/fsquery.py b/fsquery/fsquery.py
index <HASH>..<HASH> 100644
--- a/fsquery/fsquery.py
+++ b/fsquery/fsquery.py
@@ -67,6 +67,22 @@ class FSNode :
if r.search(line) :
return True
return False
+
+ def get_child(self,pat) :
+ if not self.isdir() : raise Exception("FSQuery tried to get a child in a node which is not a directory : %s" % self.abs)
+ r = re.compile(pat)
+ for c in self.children() :
+ if r.search(c.basename()) : return c
+ return False
+
+ def contains_file(self,pat) :
+ if not self.isdir() : raise Exception("FSQuery tried to check filenames in a node which is not a directory : %s" % self.abs)
+ c = self.get_child(pat)
+ if c : return True
+ else : return False
+
+ def get_parent(self) :
+ return FSNode(os.path.dirname(self.abs),self.root,self.depth-1)
def clone(self,new_root) :
return FSNode(new_root+"/"+self.relative(),new_root,self.depth)
|
added git_child and get_parent functionality to FSNode
|
diff --git a/lib/chewy/config.rb b/lib/chewy/config.rb
index <HASH>..<HASH> 100644
--- a/lib/chewy/config.rb
+++ b/lib/chewy/config.rb
@@ -112,6 +112,7 @@ module Chewy
def configuration
yaml_settings.merge(settings.deep_symbolize_keys).tap do |configuration|
configuration[:logger] = transport_logger if transport_logger
+ configuration[:indices_path] = indices_path if indices_path
configuration.merge!(tracer: transport_tracer) if transport_tracer
end
end
|
Use default indices_path path (#<I>)
Once I run `rake chewy:reset` it raised an error with:
```
TypeError: no implicit conversion of nil into String
```
Once I set `indices_path` in a chewy.yml file then this issue was solved.
Since this change now `indices_path` used by default, so you don't need to set it through chewy.yml.
|
diff --git a/utils/loggers.py b/utils/loggers.py
index <HASH>..<HASH> 100644
--- a/utils/loggers.py
+++ b/utils/loggers.py
@@ -1,7 +1,7 @@
import logging
-LOG_NAMES = ['webant', 'fsdb', 'presets', 'agherant', 'config_utils', 'libreantdb', 'archivant', 'users']
+LOG_NAMES = ['webant', 'fsdb', 'presets', 'agherant', 'config_utils', 'libreantdb', 'archivant', 'users', 'werkzeug']
def initLoggers(logLevel=logging.INFO, logNames=LOG_NAMES):
|
added werkzeug to handled loggers
|
diff --git a/blog/locallib.php b/blog/locallib.php
index <HASH>..<HASH> 100644
--- a/blog/locallib.php
+++ b/blog/locallib.php
@@ -117,7 +117,7 @@ class blog_entry {
$this->summary = file_rewrite_pluginfile_urls($this->summary, 'pluginfile.php', SYSCONTEXTID, 'blog', 'post', $this->id);
$options = array('overflowdiv'=>true);
- $template['body'] = format_text($this->summary, $this->summaryformat, $options).$cmttext;
+ $template['body'] = format_text($this->summary, $this->summaryformat, $options);
$template['title'] = format_string($this->subject);
$template['userid'] = $user->id;
$template['author'] = fullname($user);
@@ -307,6 +307,9 @@ class blog_entry {
$contentcell->text .= '</div>';
}
+ //add comments under everything
+ $contentcell->text .= $cmttext;
+
$mainrow->cells[] = $contentcell;
$table->data = array($mainrow);
|
MDL-<I> moved blog comments to end of body of blog entry. we now see the entire blog entry without comments in the way.
|
diff --git a/src/shared/js/ch.Popover.js b/src/shared/js/ch.Popover.js
index <HASH>..<HASH> 100644
--- a/src/shared/js/ch.Popover.js
+++ b/src/shared/js/ch.Popover.js
@@ -401,7 +401,6 @@
timeOut,
events;
-
function hide(event) {
if (event.target !== that._el && event.target !== that.$container[0]) {
that.hide();
|
#<I> Move private functions inside the closable scope.
|
diff --git a/calendar-bundle/src/Resources/contao/classes/Events.php b/calendar-bundle/src/Resources/contao/classes/Events.php
index <HASH>..<HASH> 100644
--- a/calendar-bundle/src/Resources/contao/classes/Events.php
+++ b/calendar-bundle/src/Resources/contao/classes/Events.php
@@ -281,6 +281,8 @@ abstract class Events extends \Module
{
$arrEvent['teaser'] = \StringUtil::toHtml5($arrEvent['teaser']);
}
+
+ $arrEvent['teaser'] = \StringUtil::encodeEmail($arrEvent['teaser']);
}
// Display the "read more" button for external/article links
|
[Calendar] Encode e-mail addresses in the event teaser.
|
diff --git a/server/camlistored/ui/blob_item_container_react.js b/server/camlistored/ui/blob_item_container_react.js
index <HASH>..<HASH> 100644
--- a/server/camlistored/ui/blob_item_container_react.js
+++ b/server/camlistored/ui/blob_item_container_react.js
@@ -379,7 +379,8 @@ cam.BlobItemContainerReact = React.createClass({
// NOTE: This method causes the URL bar to throb for a split second (at least on Chrome), so it should not be called constantly.
updateHistory_: function() {
- this.props.history.replaceState(cam.object.extend(this.props.history.state, {scroll:this.state.scroll}));
+ // second argument (title) is ignored on Firefox, but not optional.
+ this.props.history.replaceState(cam.object.extend(this.props.history.state, {scroll:this.state.scroll}), '');
},
fillVisibleAreaWithResults_: function() {
|
UI: add title arg to history.replaceState
According to
<URL> argument is ignored. However, in the chrome console
I'm getting
Uncaught TypeError: Failed to execute 'replaceState' on 'History': 2 arguments required, but only 1 present.
errors so I figure it's worth fixing.
Change-Id: I6b<I>a<I>c<I>c<I>b<I>e7df9b8acb
|
diff --git a/pkg/apis/rbac/helpers.go b/pkg/apis/rbac/helpers.go
index <HASH>..<HASH> 100644
--- a/pkg/apis/rbac/helpers.go
+++ b/pkg/apis/rbac/helpers.go
@@ -147,6 +147,10 @@ func (r PolicyRule) String() string {
func (r PolicyRule) CompactString() string {
formatStringParts := []string{}
formatArgs := []interface{}{}
+ if len(r.APIGroups) > 0 {
+ formatStringParts = append(formatStringParts, "APIGroups:%q")
+ formatArgs = append(formatArgs, r.APIGroups)
+ }
if len(r.Resources) > 0 {
formatStringParts = append(formatStringParts, "Resources:%q")
formatArgs = append(formatArgs, r.Resources)
@@ -159,10 +163,6 @@ func (r PolicyRule) CompactString() string {
formatStringParts = append(formatStringParts, "ResourceNames:%q")
formatArgs = append(formatArgs, r.ResourceNames)
}
- if len(r.APIGroups) > 0 {
- formatStringParts = append(formatStringParts, "APIGroups:%q")
- formatArgs = append(formatArgs, r.APIGroups)
- }
if len(r.Verbs) > 0 {
formatStringParts = append(formatStringParts, "Verbs:%q")
formatArgs = append(formatArgs, r.Verbs)
|
Display apiGroups before resources in PolicyRule
|
diff --git a/Form/Type/StatusType.php b/Form/Type/StatusType.php
index <HASH>..<HASH> 100644
--- a/Form/Type/StatusType.php
+++ b/Form/Type/StatusType.php
@@ -15,7 +15,7 @@ class StatusType extends AbstractType
unset($choices[0]);
$resolver->setDefaults(array(
- 'choices' => TicketMessage::$choices,
+ 'choices' => $choices,
));
}
|
fix typo: $choices isn't a property of TicketMessage
|
diff --git a/bcbio/variation/phasing.py b/bcbio/variation/phasing.py
index <HASH>..<HASH> 100644
--- a/bcbio/variation/phasing.py
+++ b/bcbio/variation/phasing.py
@@ -28,7 +28,9 @@ def read_backed_phasing(vcf_file, bam_files, genome_file, region, config):
params = ["-T", "ReadBackedPhasing",
"-R", genome_file,
"--variant", vcf_file,
- "--out", tx_out_file]
+ "--out", tx_out_file,
+ "--downsample_to_coverage", "250",
+ "--downsampling_type", "BY_SAMPLE"]
for bam_file in bam_files:
params += ["-I", bam_file]
variant_regions = config["algorithm"].get("variant_regions", None)
|
Downsample by default for phasing to avoid slowdowns in deeply covered regions
|
diff --git a/angr/analyses/cfg.py b/angr/analyses/cfg.py
index <HASH>..<HASH> 100644
--- a/angr/analyses/cfg.py
+++ b/angr/analyses/cfg.py
@@ -2558,6 +2558,7 @@ class CFG(Analysis, CFGBase):
return self._immediate_dominators(end, target_graph=target_graph, reverse_graph=True)
def __setstate__(self, s):
+ self.project = s['project']
self._graph = s['graph']
self._function_manager = s['function_manager']
self._loop_back_edges = s['_loop_back_edges']
@@ -2570,6 +2571,7 @@ class CFG(Analysis, CFGBase):
def __getstate__(self):
s = { }
+ s['project'] = self.project
s['graph'] = self._graph
s['function_manager'] = self._function_manager
s['_loop_back_edges'] = self._loop_back_edges
|
CFG: dump self.projects when pickling CFGs.
|
diff --git a/proso_concepts/models.py b/proso_concepts/models.py
index <HASH>..<HASH> 100644
--- a/proso_concepts/models.py
+++ b/proso_concepts/models.py
@@ -257,7 +257,7 @@ class UserStatManager(models.Manager):
environment = get_environment()
mastery_threshold = get_mastery_trashold()
for user, concepts in concepts.items():
- all_items = set(flatten([items[c] for c in concepts]))
+ all_items = list(set(flatten([items[c] for c in concepts])))
answer_counts = dict(list(zip(all_items, environment.number_of_answers_more_items(all_items, user))))
correct_answer_counts = dict(list(zip(all_items,
environment.number_of_correct_answers_more_items(all_items, user))))
|
concepts - for sqlite - give list to environment instead of set
|
diff --git a/app/templates/src/main/java/package/domain/_User.java b/app/templates/src/main/java/package/domain/_User.java
index <HASH>..<HASH> 100644
--- a/app/templates/src/main/java/package/domain/_User.java
+++ b/app/templates/src/main/java/package/domain/_User.java
@@ -57,8 +57,8 @@ public class User implements Serializable {
<% if (databaseType == 'sql') { %>@JsonIgnore
@OneToMany(mappedBy = "user")<% } %><% if (hibernateCache != 'no' && databaseType == 'sql') { %>
- @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
- private Set<PersistentToken> persistentTokens;<% } %>
+ @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)<% } %>
+ private Set<PersistentToken> persistentTokens;
public String getLogin() {
return login;
|
The field should be present independent to hibernateCache fixes #<I>
|
diff --git a/src/notebook/epics/github-publish.js b/src/notebook/epics/github-publish.js
index <HASH>..<HASH> 100644
--- a/src/notebook/epics/github-publish.js
+++ b/src/notebook/epics/github-publish.js
@@ -40,7 +40,6 @@ export function notifyUser(filename, gistID, notificationSystem) {
},
});
}
-// give these module scope to allow overwriting of metadata
/**
* Callback function to be used in publishNotebookObservable such that the
|
chore(publish): Remove extraneous comment
|
diff --git a/graylog2-server/src/main/java/org/graylog2/rest/resources/streams/StreamResource.java b/graylog2-server/src/main/java/org/graylog2/rest/resources/streams/StreamResource.java
index <HASH>..<HASH> 100644
--- a/graylog2-server/src/main/java/org/graylog2/rest/resources/streams/StreamResource.java
+++ b/graylog2-server/src/main/java/org/graylog2/rest/resources/streams/StreamResource.java
@@ -88,6 +88,7 @@ public class StreamResource extends RestResource {
streamData.put("created_at", new DateTime(DateTimeZone.UTC));
StreamImpl stream = new StreamImpl(streamData, core);
+ stream.pause();
String id;
try {
stream.save();
@@ -368,6 +369,7 @@ public class StreamResource extends RestResource {
streamData.put("created_at", new DateTime(DateTimeZone.UTC));
StreamImpl stream = new StreamImpl(streamData, core);
+ stream.pause();
String id;
try {
stream.save();
|
Newly created (or cloned) streams are paused now
Fixes #<I>
|
diff --git a/lib/resourceful/resource.js b/lib/resourceful/resource.js
index <HASH>..<HASH> 100644
--- a/lib/resourceful/resource.js
+++ b/lib/resourceful/resource.js
@@ -753,7 +753,7 @@ Resource.timestamps = function () {
//
// The last time the resource was accessed
//
- this.property('atime', 'number', { format: "unix-time", private: true });
+ // TODO: this.property('atime', 'number', { format: "unix-time", private: true });
};
Resource.define = function (schema) {
|
[minor] Comment out atime until it's logic is added
|
diff --git a/tests/Propel/Tests/Generator/Model/TableTest.php b/tests/Propel/Tests/Generator/Model/TableTest.php
index <HASH>..<HASH> 100644
--- a/tests/Propel/Tests/Generator/Model/TableTest.php
+++ b/tests/Propel/Tests/Generator/Model/TableTest.php
@@ -77,7 +77,7 @@ EOF;
$table = $schema->getDatabase('test1')->getTable('table1');
$config = new GeneratorConfig();
$config->setBuildProperties(array('propel.foo.bar.class' => 'bazz'));
- $table->getDatabase()->getSchema()->setGeneratorConfig($config);
+ $table->getDatabase()->getMappingSchema()->setGeneratorConfig($config);
$this->assertThat($table->getGeneratorConfig(), $this->isInstanceOf('\Propel\Generator\Config\GeneratorConfig'), 'getGeneratorConfig() returns an instance of the generator configuration');
$this->assertEquals($table->getGeneratorConfig()->getBuildProperty('fooBarClass'), 'bazz', 'getGeneratorConfig() returns the instance of the generator configuration used in the platform');
}
|
[Tests] fixed wrong method call in TableTest test suite.
|
diff --git a/test/unit/test_identity_map_middleware.rb b/test/unit/test_identity_map_middleware.rb
index <HASH>..<HASH> 100644
--- a/test/unit/test_identity_map_middleware.rb
+++ b/test/unit/test_identity_map_middleware.rb
@@ -8,7 +8,7 @@ class IdentityMapMiddlewareTest < Test::Unit::TestCase
@app ||= Rack::Builder.new do
use MongoMapper::Middleware::IdentityMap
map "/" do
- run lambda {|env| [200, {}, ''] }
+ run lambda {|env| [200, {}, []] }
end
map "/fail" do
run lambda {|env| raise "FAIL!" }
|
Fix middleware test on Ruby <I>
Rack's MockResponse calls #each on the body, which is not defined on String in Ruby <I>
|
diff --git a/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/template.js b/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/template.js
index <HASH>..<HASH> 100644
--- a/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/template.js
+++ b/src/scaladoc/scala/tools/nsc/doc/html/resource/lib/template.js
@@ -259,7 +259,8 @@ $(document).ready(function() {
};
$("#template li[fullComment=yes]").click(function() {
- commentToggleFct($(this));
+ var sel = window.getSelection().toString();
+ if (!sel) commentToggleFct($(this));
});
/* Linear super types and known subclasses */
|
Toggle comment if no text is selected
fixes scala/scala-lang/issues/<I>
|
diff --git a/lib/modules/apostrophe-versions/lib/routes.js b/lib/modules/apostrophe-versions/lib/routes.js
index <HASH>..<HASH> 100644
--- a/lib/modules/apostrophe-versions/lib/routes.js
+++ b/lib/modules/apostrophe-versions/lib/routes.js
@@ -8,7 +8,7 @@ module.exports = function(self, options) {
var versions;
return async.series({
findDoc: function(callback) {
- return self.apos.docs.find(req, { _id: _id }).permission('edit').toObject(function(err, _doc) {
+ return self.apos.docs.find(req, { _id: _id }).published('null').permission('edit').toObject(function(err, _doc) {
if (err) {
return callback(err);
}
|
apostrophe-versions doc cursor includes 'unpublished' docs
|
diff --git a/model/consoleState.js b/model/consoleState.js
index <HASH>..<HASH> 100644
--- a/model/consoleState.js
+++ b/model/consoleState.js
@@ -174,13 +174,15 @@ exports.ConsoleState = BaseModel.extend({
}
// Update FPS.
- var fps = 1000 / (this._tickSum / this._maxTicks);
- fps *= 100;
- fps = Math.round(fps);
- fps /= 100;
- fpsHistory.push(fps);
- while (fpsHistory.length > this._statHistory) {
- fpsHistory.shift();
+ if (this._tickSum) {
+ var fps = 1000 / (this._tickSum / this._maxTicks);
+ fps *= 100;
+ fps = Math.round(fps);
+ fps /= 100;
+ fpsHistory.push(fps);
+ while (fpsHistory.length > this._statHistory) {
+ fpsHistory.shift();
+ }
}
if ($$persistence.processId()) {
@@ -374,4 +376,4 @@ exports.ConsoleState = BaseModel.extend({
this._tickIndex = 0;
}
}
-});
\ No newline at end of file
+});
|
don't add to fps history if heartbeat hasn't started
|
diff --git a/consul/pool.go b/consul/pool.go
index <HASH>..<HASH> 100644
--- a/consul/pool.go
+++ b/consul/pool.go
@@ -215,7 +215,7 @@ func (p *ConnPool) acquire(dc string, addr net.Addr, version int) (*Conn, error)
var wait chan struct{}
var ok bool
if wait, ok = p.limiter[addr.String()]; !ok {
- wait = make(chan struct{}, 1)
+ wait = make(chan struct{})
p.limiter[addr.String()] = wait
}
isLeadThread := !ok
|
Changes to an unbuffered channel, since we just close it.
|
diff --git a/app/models/effective/datatable.rb b/app/models/effective/datatable.rb
index <HASH>..<HASH> 100644
--- a/app/models/effective/datatable.rb
+++ b/app/models/effective/datatable.rb
@@ -315,8 +315,7 @@ module Effective
cols[name][:width] ||= nil
cols[name][:sortable] = true if cols[name][:sortable] == nil
cols[name][:type] ||= (belong_tos.key?(name) ? :belongs_to : (sql_column.try(:type).presence || :string))
- cols[name][:class] = "col-#{cols[name][:type]} #{cols[name][:class]}".strip
- cols[name][:class] << ' col-actions' if name == 'actions'
+ cols[name][:class] = "col-#{cols[name][:type]} col-#{name} #{cols[name][:class]}".strip
if name == 'id' && collection.respond_to?(:deobfuscate)
cols[name][:sortable] = false
diff --git a/lib/effective_datatables/version.rb b/lib/effective_datatables/version.rb
index <HASH>..<HASH> 100644
--- a/lib/effective_datatables/version.rb
+++ b/lib/effective_datatables/version.rb
@@ -1,3 +1,3 @@
module EffectiveDatatables
- VERSION = '1.1.1'.freeze
+ VERSION = '1.1.2'.freeze
end
|
Add “col-name” as a td class as well. Version <I>
|
diff --git a/src/file/NativeFileSystem.js b/src/file/NativeFileSystem.js
index <HASH>..<HASH> 100644
--- a/src/file/NativeFileSystem.js
+++ b/src/file/NativeFileSystem.js
@@ -952,7 +952,7 @@ define(function (require, exports, module) {
if (brackets.fs.isNetworkDrive) {
brackets.fs.isNetworkDrive(rootPath, function (err, remote) {
- if (remote) {
+ if (!err && remote) {
timeout = NativeFileSystem.ASYNC_NETWORK_TIMEOUT;
}
});
|
Check errors before adjusting timeout.
|
diff --git a/builtin/providers/aws/resource_aws_volume_attachment.go b/builtin/providers/aws/resource_aws_volume_attachment.go
index <HASH>..<HASH> 100644
--- a/builtin/providers/aws/resource_aws_volume_attachment.go
+++ b/builtin/providers/aws/resource_aws_volume_attachment.go
@@ -77,6 +77,25 @@ func resourceAwsVolumeAttachmentCreate(d *schema.ResourceData, meta interface{})
vols, err := conn.DescribeVolumes(request)
if (err != nil) || (len(vols.Volumes) == 0) {
+ // This handles the situation where the instance is created by
+ // a spot request and whilst the request has been fulfilled the
+ // instance is not running yet
+ stateConf := &resource.StateChangeConf{
+ Pending: []string{"pending"},
+ Target: []string{"running"},
+ Refresh: InstanceStateRefreshFunc(conn, iID),
+ Timeout: 10 * time.Minute,
+ Delay: 10 * time.Second,
+ MinTimeout: 3 * time.Second,
+ }
+
+ _, err = stateConf.WaitForState()
+ if err != nil {
+ return fmt.Errorf(
+ "Error waiting for instance (%s) to become ready: %s",
+ iID, err)
+ }
+
// not attached
opts := &ec2.AttachVolumeInput{
Device: aws.String(name),
|
Check instance is running before trying to attach (#<I>)
This covers the scenario of an instance created by a spot request. Using
Terraform we only know the spot request is fulfilled but the instance can
still be pending which causes the attachment to fail.
|
diff --git a/source/application/tasks/build-bundles/index.js b/source/application/tasks/build-bundles/index.js
index <HASH>..<HASH> 100644
--- a/source/application/tasks/build-bundles/index.js
+++ b/source/application/tasks/build-bundles/index.js
@@ -57,11 +57,17 @@ export default async (application, settings) => {
}
// Get environments
- const environments = await getEnvironments(base, {
+ const loadedEnvironments = await getEnvironments(base, {
cache,
log
});
+ // Environments have to apply on all patterns
+ const environments = loadedEnvironments.map(environment => {
+ environment.applyTo = '**/*';
+ return environment;
+ });
+
// Get available patterns
const availablePatterns = await getPatternMtimes(base, {
resolveDependencies: true
@@ -83,10 +89,17 @@ export default async (application, settings) => {
});
// Merge environment config into transform config
- const config = merge({}, {
- patterns: application.configuration.patterns,
- transforms: application.configuration.transforms
- }, {transforms: envConfig});
+ const config = merge(
+ {},
+ {
+ patterns: application.configuration.patterns,
+ transforms: application.configuration.transforms
+ },
+ envConfig,
+ {
+ environments: [environment.name]
+ }
+ );
// build all patterns matching the include config
const builtPatterns = await Promise.all(includedPatterns
|
fix: apply environment config to bundles properly
* environment config was merged into transforms
* environment config now is merged with whole pattern config
<URL>
|
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/http/request.rb
+++ b/actionpack/lib/action_dispatch/http/request.rb
@@ -295,6 +295,8 @@ module ActionDispatch
end
end
+ # returns true if request content mime type is
+ # +application/x-www-form-urlencoded+ or +multipart/form-data+.
def form_data?
FORM_DATA_MEDIA_TYPES.include?(content_mime_type.to_s)
end
|
Documentation for ActionDispatch::Request form_data? method [ci skip]
|
diff --git a/src/Json.php b/src/Json.php
index <HASH>..<HASH> 100644
--- a/src/Json.php
+++ b/src/Json.php
@@ -4,6 +4,7 @@ declare(strict_types = 1);
namespace Innmind\Json;
use Innmind\Json\Exception\{
+ Exception,
MaximumDepthExceeded,
StateMismatch,
CharacterControlError,
@@ -24,6 +25,8 @@ final class Json
/**
* @return mixed
+ *
+ * @throws Exception
*/
public static function decode(string $string)
{
@@ -36,6 +39,8 @@ final class Json
/**
* @param mixed $content
+ *
+ * @throws Exception
*/
public static function encode($content): string
{
|
Document exceptions thrown by public methods
|
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index <HASH>..<HASH> 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -313,7 +313,7 @@ module Rails
# since it configures and mutates ARGV correctly.
class ARGVScrubber # :nodoc
def initialize(argv = ARGV)
- @argv = argv.dup
+ @argv = argv
end
def prepare!
|
no need to dup, argv is never mutated
|
diff --git a/ghost/members-api/index.js b/ghost/members-api/index.js
index <HASH>..<HASH> 100644
--- a/ghost/members-api/index.js
+++ b/ghost/members-api/index.js
@@ -96,8 +96,7 @@ module.exports = function MembersApi({
async function getMemberDataFromMagicLinkToken(token) {
const email = await magicLinkService.getUserFromToken(token);
- const {labels = [], ip} = await magicLinkService.getPayloadFromToken(token);
-
+ const {labels = [], ip, name = ''} = await magicLinkService.getPayloadFromToken(token);
if (!email) {
return null;
}
@@ -126,7 +125,7 @@ module.exports = function MembersApi({
return member;
}
- await users.create({email, labels, geolocation});
+ await users.create({name, email, labels, geolocation});
return getMemberIdentityData(email);
}
async function getMemberIdentityData(email){
@@ -165,9 +164,7 @@ module.exports = function MembersApi({
await sendEmailWithMagicLink({email, requestedType: emailType, payload});
}
} else {
- if (body.labels) {
- payload.labels = body.labels;
- }
+ Object.assign(payload, _.pick(body, ['labels', 'name']));
await sendEmailWithMagicLink({email, requestedType: emailType, payload});
}
res.writeHead(201);
|
Added name from magic link token to member creation
refs <URL>
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='Highton',
- version='1.2.6',
+ version='1.2.7',
license='Apache License 2.0',
description='A Python library for Highrise',
long_description='A beautiful Python - Highrise - API. Less is more.',
|
Version Push and Upload to PyPi
|
diff --git a/src/Zizaco/Mongolid/Model.php b/src/Zizaco/Mongolid/Model.php
index <HASH>..<HASH> 100644
--- a/src/Zizaco/Mongolid/Model.php
+++ b/src/Zizaco/Mongolid/Model.php
@@ -656,13 +656,13 @@ class Model
// will be returned from cache =)
return static::$cacheComponent->remember(
$cache_key, 0.1, function () use ($model, $ref_ids) {
- return $model::where(['_id' => ['$in' => $ref_ids]], [], true);
+ return $model::where(['_id' => ['$in' => array_values($ref_ids)]], [], true);
}
);
} elseif ($cachable) {
- return $model::where(['_id' => ['$in' => $ref_ids]], [], true);
+ return $model::where(['_id' => ['$in' => array_values($ref_ids)]], [], true);
} else {
- return $model::where(['_id' => ['$in' => $ref_ids]]);
+ return $model::where(['_id' => ['$in' => array_values($ref_ids)]]);
}
}
|
Fix error with MongoDB <I>
|
diff --git a/src/utils/save-cordova-xml.js b/src/utils/save-cordova-xml.js
index <HASH>..<HASH> 100644
--- a/src/utils/save-cordova-xml.js
+++ b/src/utils/save-cordova-xml.js
@@ -15,6 +15,9 @@ const parseXML = function(xmlPath) {
return new RSVP.Promise((resolve, reject) => {
const contents = fs.readFileSync(xmlPath, 'utf8');
const parser = new xml2js.Parser();
+
+ if (contents === '') reject('File is empty');
+
parser.parseString(contents, function (err, result) {
if (err) reject(err);
if (result) resolve(result);
|
fix(save-cordova-xml): Update test to guard against config.xml being empty
|
diff --git a/timewave/stochasticprocess.py b/timewave/stochasticprocess.py
index <HASH>..<HASH> 100755
--- a/timewave/stochasticprocess.py
+++ b/timewave/stochasticprocess.py
@@ -42,6 +42,25 @@ class StochasticProcess(object):
"""
return 0.0
+ def mean(self, t):
+ """ expected value of time :math:`t` increment
+
+ :param t:
+ :rtype float
+ :return:
+ """
+ return 0.0
+
+ def variance(self, t):
+ """ second central moment of time :math:`t` increment
+
+ :param t:
+ :rtype float
+ :return:
+ """
+ return 0.0
+
+
class MultivariateStochasticProcess(StochasticProcess):
|
adding mean and variance properties to StochasticProcess
|
diff --git a/src/org/javasimon/SimonFactory.java b/src/org/javasimon/SimonFactory.java
index <HASH>..<HASH> 100644
--- a/src/org/javasimon/SimonFactory.java
+++ b/src/org/javasimon/SimonFactory.java
@@ -149,7 +149,7 @@ public final class SimonFactory {
if (simon == null) {
simon = newSimon(name, simonClass);
} else if (simon instanceof UnknownSimon) {
- simon = replaceSimon(simon, simonClass);
+ simon = replaceSimon((UnknownSimon) simon, simonClass);
} else {
if (!(simonClass.isInstance(simon))) {
throw new SimonException("Simon named '" + name + "' already exists and its type is '" + simon.getClass().getName() + "' while requested type is '" + simonClass.getName() + "'.");
@@ -158,8 +158,10 @@ public final class SimonFactory {
return simon;
}
- private static Simon replaceSimon(Simon simon, Class<? extends AbstractSimon> simonClass) {
+ private static Simon replaceSimon(UnknownSimon simon, Class<? extends AbstractSimon> simonClass) {
AbstractSimon newSimon = instantiateSimon(simon.getName(), simonClass);
+ newSimon.enabled = simon.enabled;
+
// fixes parent link and parent's children list
((AbstractSimon) simon.getParent()).replace(simon, newSimon);
|
Fixed enable/disable state after replacing unknown simon with a concrete one.
|
diff --git a/js/allcoin.js b/js/allcoin.js
index <HASH>..<HASH> 100644
--- a/js/allcoin.js
+++ b/js/allcoin.js
@@ -27,6 +27,11 @@ module.exports = class allcoin extends okcoinusd {
'doc': 'https://www.allcoin.com/api_market/market',
'referral': 'https://www.allcoin.com',
},
+ 'status': {
+ 'status': 'shutdown',
+ 'updated': undefined,
+ 'eta': undefined,
+ },
'api': {
'web': {
'get': [
|
[Allcoin] Set Status to Shutdown
|
diff --git a/mythril/analysis/modules/multiple_sends.py b/mythril/analysis/modules/multiple_sends.py
index <HASH>..<HASH> 100644
--- a/mythril/analysis/modules/multiple_sends.py
+++ b/mythril/analysis/modules/multiple_sends.py
@@ -1,4 +1,5 @@
from mythril.analysis.report import Issue
+from mythril.laser.ethereum.cfg import JumpType
"""
MODULE DESCRIPTION:
@@ -50,7 +51,8 @@ def _explore_states(call, statespace):
def _child_nodes(statespace, node):
result = []
- children = [statespace.nodes[edge.node_to] for edge in statespace.edges if edge.node_from == node.uid]
+ children = [statespace.nodes[edge.node_to] for edge in statespace.edges if edge.node_from == node.uid
+ and edge.type != JumpType.Transaction]
for child in children:
result.append(child)
|
Don't explore nodes that aren't in the same transaction
|
diff --git a/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java b/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
index <HASH>..<HASH> 100644
--- a/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
+++ b/compare-comply/src/main/java/com/ibm/watson/compare_comply/v1/CompareComply.java
@@ -482,6 +482,7 @@ public class CompareComply extends BaseService {
}
builder.header("Accept", "application/json");
if (listBatchesOptions != null) {
+
}
ResponseConverter<Batches> responseConverter = ResponseConverterUtils.getValue(
new com.google.gson.reflect.TypeToken<Batches>() {
@@ -521,6 +522,7 @@ public class CompareComply extends BaseService {
builder.header(header.getKey(), header.getValue());
}
builder.header("Accept", "application/json");
+
ResponseConverter<BatchStatus> responseConverter = ResponseConverterUtils.getValue(
new com.google.gson.reflect.TypeToken<BatchStatus>() {
}.getType());
|
refactor(Compare and Comply): Add newest generator output
|
diff --git a/spinoff/util/microprocess.py b/spinoff/util/microprocess.py
index <HASH>..<HASH> 100644
--- a/spinoff/util/microprocess.py
+++ b/spinoff/util/microprocess.py
@@ -75,7 +75,7 @@ class MicroProcess(object):
@self.d.addBoth
def finally_(result):
d = self._on_complete()
- if d:
+ if d and not isinstance(result, Failure):
ret = Deferred()
d.addCallback(lambda _: result) # pass the original result through
d.chainDeferred(ret) # ...but other than that wait on the new deferred
|
Avoid swallowing exceptions in microprocesses
|
diff --git a/lib/graphql/subscriptions/action_cable_subscriptions.rb b/lib/graphql/subscriptions/action_cable_subscriptions.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql/subscriptions/action_cable_subscriptions.rb
+++ b/lib/graphql/subscriptions/action_cable_subscriptions.rb
@@ -46,7 +46,7 @@ module GraphQL
# # Track the subscription here so we can remove it
# # on unsubscribe.
# if result.context[:subscription_id]
- # @subscription_ids << context[:subscription_id]
+ # @subscription_ids << result.context[:subscription_id]
# end
#
# transmit(payload)
|
Fix ActionCableSubscriptions channel example
Simple typo that leads to memory leaks!
|
diff --git a/packages/address-edit/index.js b/packages/address-edit/index.js
index <HASH>..<HASH> 100644
--- a/packages/address-edit/index.js
+++ b/packages/address-edit/index.js
@@ -211,6 +211,13 @@ export default sfc({
setAddressDetail(value) {
this.data.addressDetail = value;
+ },
+
+ onDetailBlur() {
+ // await for click search event
+ setTimeout(() => {
+ this.detailFocused = false;
+ });
}
},
@@ -259,9 +266,7 @@ export default sfc({
searchResult={this.searchResult}
showSearchResult={this.showSearchResult}
onFocus={onFocus('addressDetail')}
- onBlur={() => {
- this.detailFocused = false;
- }}
+ onBlur={this.onDetailBlur}
onInput={this.onChangeDetail}
onSelect-search={event => {
this.$emit('select-search', event);
|
[bugfix] AddressEdit: select search not work in vue <I>+ (#<I>)
|
diff --git a/rejected/common.py b/rejected/common.py
index <HASH>..<HASH> 100644
--- a/rejected/common.py
+++ b/rejected/common.py
@@ -8,7 +8,15 @@ __since__ = '2011-07-22'
def get_consumer_config(config):
- return config.get('Consumers') or config.get('Bindings')
+ config = config.get('Consumers') or config.get('Bindings')
+
+ # Squash the configs down
+ for name in config:
+ if 'consumers' in config[name]:
+ config[name].update(config[name]['consumers'])
+ del config[name]['consumers']
+ return config
+
def get_poll_interval(config):
monitoring = config.get('Monitoring', dict())
|
Squash legacy consumers YAML section into the main consumer config section
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,6 @@ params = dict(
url="https://github.com/jaraco/" + name,
packages=setuptools.find_packages(),
include_package_data=True,
- namespace_packages=name.split('.')[:-1],
install_requires=[
'requests',
'six>=1.4,<2dev',
|
Also need to remove the namespace packages declaration
|
diff --git a/openquake/calculators/disaggregation.py b/openquake/calculators/disaggregation.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/disaggregation.py
+++ b/openquake/calculators/disaggregation.py
@@ -279,6 +279,7 @@ producing too small PoEs.'''
for s in self.sitecol.sids:
iml2 = iml2s[s]
r = rlzs[s]
+ logging.info('Site #%d, disaggregating for rlz=#%d', s, r)
for p, poe in enumerate(oq.poes_disagg or [None]):
for m, imt in enumerate(oq.imtls):
self.imldict[s, r, poe, imt] = iml2[m, p]
|
Better logging for disaggregation [skip CI]
Former-commit-id: d<I>bfcd4ee<I>e<I>bf<I>e5f<I>a<I>ab<I>
|
diff --git a/Lib/ufo2ft/filters/cubicToQuadratic.py b/Lib/ufo2ft/filters/cubicToQuadratic.py
index <HASH>..<HASH> 100644
--- a/Lib/ufo2ft/filters/cubicToQuadratic.py
+++ b/Lib/ufo2ft/filters/cubicToQuadratic.py
@@ -29,7 +29,7 @@ class CubicToQuadraticFilter(BaseFilter):
logger.info('New spline lengths: %s' % (', '.join(
'%s: %d' % (l, stats[l]) for l in sorted(stats.keys()))))
- def filter(self, glyph, glyphSet=None):
+ def filter(self, glyph):
if not len(glyph):
return False
|
[cubicToQuadratic] minor
forgot to remove this in <I>
|
diff --git a/liquibase-core/src/main/java/liquibase/database/core/PostgresDatabase.java b/liquibase-core/src/main/java/liquibase/database/core/PostgresDatabase.java
index <HASH>..<HASH> 100644
--- a/liquibase-core/src/main/java/liquibase/database/core/PostgresDatabase.java
+++ b/liquibase-core/src/main/java/liquibase/database/core/PostgresDatabase.java
@@ -41,7 +41,9 @@ public class PostgresDatabase extends AbstractJdbcDatabase {
@Override
public void setConnection(DatabaseConnection conn) {
try {
- reservedWords.addAll(Arrays.asList(((JdbcConnection) conn).getMetaData().getSQLKeywords().toUpperCase().split(",\\s*")));
+ if (conn instanceof JdbcConnection) {
+ reservedWords.addAll(Arrays.asList(((JdbcConnection) conn).getMetaData().getSQLKeywords().toUpperCase().split(",\\s*")));
+ }
} catch (Exception e) {
LogFactory.getLogger().warning("Cannot retrieve reserved words", e);
}
|
Check connection type to work better with tests with mock connection
|
diff --git a/kitnirc/client.py b/kitnirc/client.py
index <HASH>..<HASH> 100644
--- a/kitnirc/client.py
+++ b/kitnirc/client.py
@@ -401,7 +401,7 @@ class Client(object):
def part(self, target, message=None):
"""Part a channel."""
- if target not in self.server.channels:
+ if str(target) not in self.server.channels:
_log.warning("Ignoring request to part channel '%s' because we "
"are not in that channel.", target)
return
@@ -437,7 +437,7 @@ class Client(object):
(Values for modes which do not take arguments are ignored.)
"""
- if channel not in self.server.channels:
+ if str(channel) not in self.server.channels:
_log.warning("Ignoring request to set modes in channel '%s' "
"because we are not in that channel.", channel)
return
|
String-ify before checking .channels membership
This allows passing in `Channel` objects to work properly.
|
diff --git a/angr/storage/memory_mixins/address_concretization_mixin.py b/angr/storage/memory_mixins/address_concretization_mixin.py
index <HASH>..<HASH> 100644
--- a/angr/storage/memory_mixins/address_concretization_mixin.py
+++ b/angr/storage/memory_mixins/address_concretization_mixin.py
@@ -340,7 +340,7 @@ class AddressConcretizationMixin(MemoryMixin):
raise
# quick optimization so as to not involve the solver if not necessary
- trivial = type(addr) is int or (len(concrete_addrs) == 1 and (addr == concrete_addrs[0]).is_true())
+ trivial = len(concrete_addrs) == 1 and (addr == concrete_addrs[0]).is_true()
if not trivial:
# apply the concretization results to the state
constraint_options = [addr == concrete_addr for concrete_addr in concrete_addrs]
|
Remove a check that is no longer necessary.
|
diff --git a/test/beetle/message_test.rb b/test/beetle/message_test.rb
index <HASH>..<HASH> 100644
--- a/test/beetle/message_test.rb
+++ b/test/beetle/message_test.rb
@@ -466,5 +466,17 @@ module Beetle
assert !@r.exists(message.mutex_key)
end
end
+
+ class RedisAssumptionsTest < Test::Unit::TestCase
+ def setup
+ @r = Message.redis
+ @r.flushdb
+ end
+
+ test "trying to delete a non existent key doesn't throw an error" do
+ assert !@r.del("hahahaha")
+ assert !@r.exists("hahahaha")
+ end
+ end
end
|
verify a basic assumotion on deleting redis keys
|
diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Test/Case/Utility/ValidationTest.php
+++ b/lib/Cake/Test/Case/Utility/ValidationTest.php
@@ -1965,7 +1965,6 @@ class ValidationTest extends CakeTestCase {
$this->assertTrue(Validation::money('100.111,1'));
$this->assertTrue(Validation::money('100.111,11'));
$this->assertFalse(Validation::money('100.111,111'));
- $this->assertFalse(Validation::money('text'));
$this->assertTrue(Validation::money('$100'));
$this->assertTrue(Validation::money('$100.11'));
|
removed duplicate test case
```$this->assertFalse(Validation::money('text'));```
is now tested only once
|
diff --git a/test/loadings.js b/test/loadings.js
index <HASH>..<HASH> 100644
--- a/test/loadings.js
+++ b/test/loadings.js
@@ -10,8 +10,6 @@ dom.settings.timeout = 900000;
dom.settings.stallTimeout = 200; // the value used in the tests
dom.settings.console = true;
dom.settings.pool.max = 8;
-require('http').globalAgent.maxSockets = 500;
-
describe("Loading ressources", function suite() {
var server, port;
diff --git a/test/when.js b/test/when.js
index <HASH>..<HASH> 100644
--- a/test/when.js
+++ b/test/when.js
@@ -9,7 +9,6 @@ dom.settings.allow = 'all';
dom.settings.timeout = 10000;
dom.settings.console = true;
dom.settings.pool.max = 8;
-require('http').globalAgent.maxSockets = 50000;
function pagePluginTest(page, plugin, ev) {
page.when(ev, function(cb) {
|
maxSockets is now infinity by default
|
diff --git a/tests/integration/modules/grains.py b/tests/integration/modules/grains.py
index <HASH>..<HASH> 100644
--- a/tests/integration/modules/grains.py
+++ b/tests/integration/modules/grains.py
@@ -142,9 +142,8 @@ class GrainsAppendTestCase(integration.ModuleCase):
GRAIN_VAL = 'my-grain-val'
def tearDown(self):
- test_grain = self.run_function('grains.get', [self.GRAIN_KEY])
- if test_grain and test_grain == [self.GRAIN_VAL]:
- self.run_function('grains.remove', [self.GRAIN_KEY, self.GRAIN_VAL])
+ for item in self.run_function('grains.get', [self.GRAIN_KEY])
+ self.run_function('grains.remove', [self.GRAIN_KEY, item])
def test_grains_append(self):
'''
|
Attempt to fix failing grains tests in <I>
The tearDown appears to only be removing the grain if it matches a
specific value. This may be leading to the grain value not being blank
at the time the next test is run.
Instead of only deleting the grain if it matches a specific value,
instead delete all items from that grain to ensure that it is empty for
the next test.
|
diff --git a/molgenis-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java b/molgenis-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java
index <HASH>..<HASH> 100644
--- a/molgenis-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java
+++ b/molgenis-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java
@@ -148,10 +148,10 @@ public class DataExplorerController extends MolgenisPluginController
checkExistsAndPermission(selectedEntityName, message, entityExists, hasEntityPermission);
}
}
- if (StringUtils.isNotEmpty(model.toString()))
+ if (StringUtils.isNotEmpty(message.toString()))
{
- model.addAttribute("warningMessage", message.toString());
- }
+ model.addAttribute("warningMessage", message.toString());
+ }
model.addAttribute("selectedEntityName", selectedEntityName);
model.addAttribute("isAdmin", SecurityUtils.currentUserIsSu());
|
Fix #<I>: Fileingest does not show "target" anymore
|
diff --git a/tools/otci/otci/otci.py b/tools/otci/otci/otci.py
index <HASH>..<HASH> 100644
--- a/tools/otci/otci/otci.py
+++ b/tools/otci/otci/otci.py
@@ -75,7 +75,7 @@ class OTCI(object):
while duration > 0:
output = self.__otcmd.wait(1)
- if match_line(expect_line, output):
+ if any(match_line(line, expect_line) for line in output):
success = True
break
|
[otci] fix OTCI.wait arg order (#<I>)
In wait, match_line is called with the arguments flipped. The first
argument is supposed to the be the line being checked, and the second
is supposed to be the pattern to match. The reason this still works
for strings is because output is treated as a list of lines to expect,
and each is just compared with == to the actual expected line
|
diff --git a/cherrypy/_cpengine.py b/cherrypy/_cpengine.py
index <HASH>..<HASH> 100644
--- a/cherrypy/_cpengine.py
+++ b/cherrypy/_cpengine.py
@@ -59,6 +59,8 @@ class Engine(object):
self.mtimes = {}
self.reload_files = []
+
+ self.monitor_thread = None
def start(self, blocking=True):
"""Start the application engine."""
|
Engine.monitor_thread defaults to None now.
This is in case an Exception is raised in an on_start_engine function and the code to start/stop the engine is wrapped in a try/finally, where Engine.stop is called in finally.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -37,5 +37,5 @@ module.exports.setDefaultFormat = function(format) {
* Add filter to nunjucks environment
*/
module.exports.install = function(env, customName) {
- env.addFilter(customName || 'date', getFilter());
+ env.addFilter(customName || 'date', getFilter);
};
|
Module: Modified getFitler functionality.
- removed extra parenthesis otherwise filter does not work when added to nunjucks.
|
diff --git a/pyemu/mat/mat_handler.py b/pyemu/mat/mat_handler.py
index <HASH>..<HASH> 100644
--- a/pyemu/mat/mat_handler.py
+++ b/pyemu/mat/mat_handler.py
@@ -1913,7 +1913,7 @@ class Cov(Matrix):
def identity_like(cls,other):
assert other.shape[0] == other.shape[1]
x = np.identity(other.shape[0])
- return cls(x=x,names=other.row_names,isdiagonal=True)
+ return cls(x=x,names=other.row_names,isdiagonal=False)
def to_pearson(self):
|
bug fix in Cov.identity_like(): needs to be isdiagonal=False
|
diff --git a/spotify/models/user.py b/spotify/models/user.py
index <HASH>..<HASH> 100644
--- a/spotify/models/user.py
+++ b/spotify/models/user.py
@@ -71,11 +71,10 @@ class User(URIBase, AsyncIterable): # pylint: disable=too-many-instance-attribu
self._refresh_task = None
self.__client = self.client = client
- try:
- self.http = kwargs.pop("http")
- except KeyError:
- pass # TODO: Failing silently here, we should take some action.
+ if "http" not in kwargs:
+ self.library = self.http = None
else:
+ self.http = kwargs.pop("http")
self.library = Library(client, self)
# Public user object attributes
@@ -103,7 +102,7 @@ class User(URIBase, AsyncIterable): # pylint: disable=too-many-instance-attribu
def __getattr__(self, attr):
value = object.__getattribute__(self, attr)
- if hasattr(value, "__ensure_http__") and not hasattr(self, "http"):
+ if hasattr(value, "__ensure_http__") and getattr(self, "http", None) is not None:
@functools.wraps(value)
def _raise(*args, **kwargs):
|
bugfix set http and library User attrs to None when http is disabled
|
diff --git a/engine/graph/api/src/main/java/org/jboss/windup/graph/dao/JavaClassDao.java b/engine/graph/api/src/main/java/org/jboss/windup/graph/dao/JavaClassDao.java
index <HASH>..<HASH> 100644
--- a/engine/graph/api/src/main/java/org/jboss/windup/graph/dao/JavaClassDao.java
+++ b/engine/graph/api/src/main/java/org/jboss/windup/graph/dao/JavaClassDao.java
@@ -20,7 +20,7 @@ public class JavaClassDao extends BaseDao<JavaClass> {
JavaClass clz = getByUniqueProperty("qualifiedName", qualifiedName);
if (clz == null) {
- clz = (JavaClass) this.create(null);
+ clz = (JavaClass) this.create();
clz.setQualifiedName(qualifiedName);
}
|
Removed null and use the no-args method
|
diff --git a/metrics-core/src/test/java/com/yammer/metrics/core/tests/HistogramTest.java b/metrics-core/src/test/java/com/yammer/metrics/core/tests/HistogramTest.java
index <HASH>..<HASH> 100644
--- a/metrics-core/src/test/java/com/yammer/metrics/core/tests/HistogramTest.java
+++ b/metrics-core/src/test/java/com/yammer/metrics/core/tests/HistogramTest.java
@@ -101,7 +101,7 @@ public class HistogramTest {
histogram.stdDev(),
is(closeTo(288.8194360957494, 0.0001)));
- assertThat("the histogram has a sum of 499500",
+ assertThat("the histogram has a sum of 500500",
histogram.sum(),
is(closeTo(500500, 0.1)));
|
Fixed incorrect assertion label in HistogramTest
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.