diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/backbone.js b/backbone.js
index <HASH>..<HASH> 100644
--- a/backbone.js
+++ b/backbone.js
@@ -1369,10 +1369,9 @@
return Backbone.ajax(_.extend(params, options));
};
- // Set the default ajax method if $ is defined.
- if ($) Backbone.ajax = function () {
- return $.ajax.apply(Backbone, arguments);
- }
+ // If `$` is defined, set the default implementation of `Backbone.ajax` to
+ // proxy through.
+ if ($) Backbone.ajax = function(){ return $.ajax.apply($, arguments); };
// Wrap an optional error callback with a fallback error event.
Backbone.wrapError = function(onError, originalModel, options) {
|
Fixing Backbone.ajax implementation.
|
diff --git a/plugins/Referrers/Columns/Keyword.php b/plugins/Referrers/Columns/Keyword.php
index <HASH>..<HASH> 100644
--- a/plugins/Referrers/Columns/Keyword.php
+++ b/plugins/Referrers/Columns/Keyword.php
@@ -44,7 +44,11 @@ class Keyword extends Base
$information = $this->getReferrerInformationFromRequest($request);
if (!empty($information['referer_keyword'])) {
- return substr($information['referer_keyword'], 0, 255);
+ if (function_exists('mb_substr')) {
+ return mb_substr($information['referer_keyword'], 0, 255, 'UTF-8');
+ } else {
+ return substr($information['referer_keyword'], 0, 255);
+ }
}
return $information['referer_keyword'];
|
Internal / external search strings will be reduced more than <I> "bytes" without boundary.
|
diff --git a/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java b/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java
index <HASH>..<HASH> 100644
--- a/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java
+++ b/ribbon-archaius/src/main/java/com/netflix/client/config/DefaultClientConfigImpl.java
@@ -391,6 +391,18 @@ public class DefaultClientConfigImpl extends AbstractDefaultClientConfigImpl {
return getDefaultPropName(propName.key());
}
+ public String getInstancePropName(String restClientName,
+ IClientConfigKey configKey) {
+ return getInstancePropName(restClientName, configKey.key());
+ }
+
+ public String getInstancePropName(String restClientName, String key) {
+ if (getNameSpace() == null) {
+ throw new NullPointerException("getNameSpace() may not be null");
+ }
+ return restClientName + "." + getNameSpace() + "." + key;
+ }
+
public DefaultClientConfigImpl withProperty(IClientConfigKey key, Object value) {
setProperty(key, value);
return this;
|
add back API that was accidentally deleted in refactor
|
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb
index <HASH>..<HASH> 100644
--- a/actionpack/test/template/test_case_test.rb
+++ b/actionpack/test/template/test_case_test.rb
@@ -24,7 +24,7 @@ module ActionView
test_case.class_eval do
test "helpers defined on ActionView::TestCase are available" do
assert test_case.ancestors.include?(ASharedTestHelper)
- assert 'Holla!', from_shared_helper
+ assert_equal 'Holla!', from_shared_helper
end
end
end
@@ -41,7 +41,7 @@ module ActionView
helper AnotherTestHelper
test "additional helper classes can be specified as in a controller" do
assert test_case.ancestors.include?(AnotherTestHelper)
- assert 'Howdy!', from_another_helper
+ assert_equal 'Howdy!', from_another_helper
end
end
@@ -58,14 +58,14 @@ module ActionView
helper AnotherTestHelper
test "additional helper classes can be specified as in a controller" do
assert test_case.ancestors.include?(AnotherTestHelper)
- assert 'Howdy!', from_another_helper
+ assert_equal 'Howdy!', from_another_helper
test_case.helper_class.module_eval do
def render_from_helper
from_another_helper
end
end
- assert 'Howdy!', render(:partial => 'test/from_helper')
+ assert_equal 'Howdy!', render(:partial => 'test/from_helper')
end
end
|
Make some assertions in the ActionView::TestCase tests actually do something.
[#<I> state:resolved]
|
diff --git a/ntfy/__init__.py b/ntfy/__init__.py
index <HASH>..<HASH> 100644
--- a/ntfy/__init__.py
+++ b/ntfy/__init__.py
@@ -7,13 +7,6 @@ try:
except:
__version__ = 'unknown'
-try:
- from dbus.exceptions import DBusException
-except ImportError:
-
- class DBusException(Exception):
- pass
-
def notify(message, title, config=None, **kwargs):
from .config import load_config
@@ -41,9 +34,6 @@ def notify(message, title, config=None, **kwargs):
module.notify(message=message, title=title, **backend_config)
except (SystemExit, KeyboardInterrupt):
raise
- except DBusException:
- logging.getLogger(__name__).warning(
- 'Failed to send notification using {}'.format(backend))
except Exception:
logging.getLogger(__name__).error(
'Failed to send notification using {}'.format(backend),
|
Don't give DBusExceptions special treament, would've avoided #<I>
|
diff --git a/src/Bugsnag/Error.php b/src/Bugsnag/Error.php
index <HASH>..<HASH> 100644
--- a/src/Bugsnag/Error.php
+++ b/src/Bugsnag/Error.php
@@ -225,7 +225,7 @@ class Bugsnag_Error
return $cleanArray;
} elseif (is_string($obj)) {
// UTF8-encode if not already encoded
- if (!mb_detect_encoding($obj, 'UTF-8', true)) {
+ if (function_exists('mb_detect_encoding') && !mb_detect_encoding($obj, 'UTF-8', true)) {
return utf8_encode($obj);
} else {
return $obj;
|
Only do encoding magic if mb_detect_encoding is available
|
diff --git a/flake8_import_order/stdlib_list.py b/flake8_import_order/stdlib_list.py
index <HASH>..<HASH> 100644
--- a/flake8_import_order/stdlib_list.py
+++ b/flake8_import_order/stdlib_list.py
@@ -40,6 +40,7 @@ STDLIB_NAMES = set((
"__main__",
"_dummy_thread",
"_thread",
+ "_threading_local",
"abc",
"aepack",
"aetools",
|
Add _threading_local to the stdlib list
|
diff --git a/lib/formtools/form.js b/lib/formtools/form.js
index <HASH>..<HASH> 100644
--- a/lib/formtools/form.js
+++ b/lib/formtools/form.js
@@ -106,12 +106,17 @@ var generateFormFromModel = exports.generateFormFromModel = function (m, r, form
linz.mongoose.models[m.schema.tree[fieldName].ref].find({}, function (err, docs) {
field.type = 'enum';
- choices = {};
+ choices = [];
docs.forEach(function (doc) {
- choices[doc._id.toString()] = doc.title || doc.label || doc.name || doc.toString();
+ choices.push({
+ value: doc._id.toString(),
+ label: doc.title || doc.label || doc.name || doc.toString()
+ });
});
+ field.list = choices;
+
callback(null);
});
|
Ref property values now appear in the select lists.
|
diff --git a/open/exec_windows.go b/open/exec_windows.go
index <HASH>..<HASH> 100644
--- a/open/exec_windows.go
+++ b/open/exec_windows.go
@@ -20,7 +20,7 @@ func cleaninput(input string) string {
}
func open(input string) *exec.Cmd {
- return exec.Command(runDll32, cmd, cleaninput(input))
+ return exec.Command(runDll32, cmd, input)
}
func openWith(input string, appName string) *exec.Cmd {
|
Fixing #9 - not replacing ampersand in calls to rundll<I>
|
diff --git a/src/main/java/technology/tabula/json/TableSerializer.java b/src/main/java/technology/tabula/json/TableSerializer.java
index <HASH>..<HASH> 100644
--- a/src/main/java/technology/tabula/json/TableSerializer.java
+++ b/src/main/java/technology/tabula/json/TableSerializer.java
@@ -30,6 +30,8 @@ public final class TableSerializer implements JsonSerializer<Table> {
result.addProperty("left", src.getLeft());
result.addProperty("width", src.getWidth());
result.addProperty("height", src.getHeight());
+ result.addProperty("right", src.getRight());
+ result.addProperty("bottom", src.getBottom());
JsonArray data;
result.add("data", data = new JsonArray());
|
Add right and bottom of area to JSON output
|
diff --git a/charmhelpers/contrib/hahelpers/cluster.py b/charmhelpers/contrib/hahelpers/cluster.py
index <HASH>..<HASH> 100644
--- a/charmhelpers/contrib/hahelpers/cluster.py
+++ b/charmhelpers/contrib/hahelpers/cluster.py
@@ -44,6 +44,7 @@ from charmhelpers.core.hookenv import (
ERROR,
WARNING,
unit_get,
+ is_leader as juju_is_leader
)
from charmhelpers.core.decorators import (
retry_on_exception,
@@ -66,12 +67,18 @@ def is_elected_leader(resource):
Returns True if the charm executing this is the elected cluster leader.
It relies on two mechanisms to determine leadership:
- 1. If the charm is part of a corosync cluster, call corosync to
+ 1. If juju is sufficiently new and leadership election is supported,
+ the is_leader command will be used.
+ 2. If the charm is part of a corosync cluster, call corosync to
determine leadership.
- 2. If the charm is not part of a corosync cluster, the leader is
+ 3. If the charm is not part of a corosync cluster, the leader is
determined as being "the alive unit with the lowest unit numer". In
other words, the oldest surviving unit.
"""
+ try:
+ return juju_is_leader()
+ except NotImplementedError:
+ pass
if is_clustered():
if not is_crm_leader(resource):
log('Deferring action to CRM leader.', level=INFO)
|
Try using juju leadership for leadership determination
|
diff --git a/pkg/kubelet/runtime.go b/pkg/kubelet/runtime.go
index <HASH>..<HASH> 100644
--- a/pkg/kubelet/runtime.go
+++ b/pkg/kubelet/runtime.go
@@ -23,7 +23,7 @@ import (
)
type runtimeState struct {
- sync.Mutex
+ sync.RWMutex
lastBaseRuntimeSync time.Time
baseRuntimeSyncThreshold time.Duration
networkError error
@@ -57,8 +57,8 @@ func (s *runtimeState) setPodCIDR(cidr string) {
}
func (s *runtimeState) podCIDR() string {
- s.Lock()
- defer s.Unlock()
+ s.RLock()
+ defer s.RUnlock()
return s.cidr
}
@@ -69,8 +69,8 @@ func (s *runtimeState) setInitError(err error) {
}
func (s *runtimeState) errors() []string {
- s.Lock()
- defer s.Unlock()
+ s.RLock()
+ defer s.RUnlock()
var ret []string
if s.initError != nil {
ret = append(ret, s.initError.Error())
|
optimize lock of runtimeState stuct
|
diff --git a/edit_interface.php b/edit_interface.php
index <HASH>..<HASH> 100644
--- a/edit_interface.php
+++ b/edit_interface.php
@@ -317,7 +317,7 @@ case 'editraw':
// Notes are special - they may contain data on the first line
$gedrec=preg_replace('/^(0 @'.WT_REGEX_XREF.'@ NOTE) (.+)/', "$1\n1 CONC $2", $gedrec);
list($gedrec1, $gedrec2)=explode("\n", $gedrec, 2);
- echo '<textarea name="newgedrec1" rows="1" cols="80" readonly="yes">', $gedrec1, '</textarea><br />';
+ echo '<textarea name="newgedrec1" rows="1" cols="80" dir="ltr" readonly="yes">', $gedrec1, '</textarea><br />';
echo '<textarea name="newgedrec2" rows="20" cols="80" dir="ltr">', $gedrec2, "</textarea><br />";
if (WT_USER_IS_ADMIN) {
echo "<table class=\"facts_table\">";
|
RTL: first line of record has wrong alignment in raw gedcom editing
|
diff --git a/src/Shader.js b/src/Shader.js
index <HASH>..<HASH> 100644
--- a/src/Shader.js
+++ b/src/Shader.js
@@ -62,10 +62,6 @@ class Shader {
const shader = this._shader = gl.createShader(glType);
gl.shaderSource(shader, this._code);
gl.compileShader(shader);
-
- if (process.env.NODE_ENV !== 'production' && !gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
- console.log(gl.getShaderInfoLog(shader));
- }
}
}
diff --git a/src/ShaderProgram.js b/src/ShaderProgram.js
index <HASH>..<HASH> 100644
--- a/src/ShaderProgram.js
+++ b/src/ShaderProgram.js
@@ -98,12 +98,6 @@ class ShaderProgram {
gl.linkProgram(this._webglProgram);
- if (process.env.NODE_ENV !== 'production' && !gl.getProgramParameter(this._webglProgram, gl.LINK_STATUS)) {
- console.error(gl.getProgramInfoLog(this._webglProgram));
- this._status = ShaderProgram.FAILED;
- return;
- }
-
this._status = ShaderProgram.READY;
for (const name in this.attributes) {
|
Remove shader get log methods (#<I>)
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -28,13 +28,15 @@ exports.attach = function (server) {
}
}
});
- var listener = io.listen(server, { log: false });
+ var sio = io.listen(server, { log: false });
var args = [].splice.call(arguments,1);
args.forEach(function (shell) {
- listener.of('/' + shell.namespace)
+ sio.of('/' + shell.namespace)
.on('connection', function (socket) {
socket.on('execute', function (cmdStr, context, options) {
console.log('%s: %s', shell.namespace, cmdStr);
+ if (!options) options = {};
+ options.socket = socket;
var result = shell.execute(cmdStr, context, options);
socket.emit('result', result);
});
|
Added 'socket' property to options object before passing it to shotgun. This will allow shotgun command modules to access socket.io functionality if needed.
|
diff --git a/db/agents.go b/db/agents.go
index <HASH>..<HASH> 100644
--- a/db/agents.go
+++ b/db/agents.go
@@ -250,12 +250,20 @@ func (db *DB) UpdateAgent(agent *Agent) error {
func (db *DB) DeleteAgent(agent *Agent) error {
return db.exclusively(func() error {
- n, err := db.count(`SELECT uuid FROM jobs WHERE agent = ?`, agent.Address)
+ n, err := db.count(`SELECT uuid FROM targets WHERE agent = ?`, agent.Address)
if err != nil {
return fmt.Errorf("unable to determine if agent can be deleted: %s", err)
}
if n > 0 {
- return fmt.Errorf("agent is still referenced by configured data protection jobs")
+ return fmt.Errorf("agent is still referenced by configured data systems")
+ }
+
+ n, err = db.count(`SELECT uuid FROM stores WHERE agent = ?`, agent.Address)
+ if err != nil {
+ return fmt.Errorf("unable to determine if agent can be deleted: %s", err)
+ }
+ if n > 0 {
+ return fmt.Errorf("agent is still referenced by configured storage systems")
}
return db.exec(`DELETE FROM agents WHERE uuid = ?`, agent.UUID)
|
Fix Agent Deletion
- Agents cannot be deleted if they are referenced by a storage system
- Agents cannot be deleted if they are referenced by a target system
- Agents can be deleted otherwise
Fixes #<I>
|
diff --git a/Classes/ViewHelpers/ForViewHelper.php b/Classes/ViewHelpers/ForViewHelper.php
index <HASH>..<HASH> 100644
--- a/Classes/ViewHelpers/ForViewHelper.php
+++ b/Classes/ViewHelpers/ForViewHelper.php
@@ -73,7 +73,7 @@ class ForViewHelper extends \F3\Fluid\Core\ViewHelper\AbstractViewHelper {
$output = '';
if (is_object($each) && $each instanceof \SplObjectStorage) {
if ($key !== '') {
- return '!CANT USE KEY ON SPLOBJECTSTORAGE!';
+ return '';
}
$eachArray = array();
foreach ($each as $singleElement) {
@@ -81,7 +81,7 @@ class ForViewHelper extends \F3\Fluid\Core\ViewHelper\AbstractViewHelper {
}
$each = $eachArray;
} elseif (!is_array($each)) {
- return '!CANT ITERATE OVER EACH!';
+ return '';
}
if ($reverse === TRUE) {
|
[~BUGFIX] Fluid (ViewHelpers): Fixed a failing test of the For view helper introduced in the last commit.
Original-Commit-Hash: <I>c<I>d<I>a6c5c<I>d<I>e0e<I>ae<I>dd<I>
|
diff --git a/lyric.js b/lyric.js
index <HASH>..<HASH> 100755
--- a/lyric.js
+++ b/lyric.js
@@ -85,7 +85,22 @@ Processor = function() {
var processorName = mapped[0].processor
, processed = processor[processorName]();
-
+ if (argv.s) {
+ var script = 'tell application "iTunes" to set lyrics of current track to "' + processed + '"'
+ applescript.execString(script, function(err, rtn) {
+ if (err) {
+ console.log("===============");
+ console.log("SET LYRIC ERROR!");
+ console.log(err);
+ console.log("===============");
+ }
+ else {
+ console.log("===============");
+ console.log("SET LYRIC DONE!");
+ console.log("===============");
+ }
+ })
+ }
console.log(processed);
}
}
|
Add --set for set lyric for current song.
|
diff --git a/angr/cfg.py b/angr/cfg.py
index <HASH>..<HASH> 100644
--- a/angr/cfg.py
+++ b/angr/cfg.py
@@ -261,10 +261,14 @@ class CFG(CFGBase):
# Start execution!
simexit = self._project.exit_to(function_addr, state=symbolic_initial_state)
simrun = self._project.sim_run(simexit)
- exits = simrun.exits()
+ exits = simrun.flat_exits()
if exits:
- final_st = exits[-1].state
+ final_st = None
+ for ex in exits:
+ if ex.state.satisfiable():
+ final_st = ex.state
+ break
else:
final_st = None
diff --git a/tests/test_cfg.py b/tests/test_cfg.py
index <HASH>..<HASH> 100644
--- a/tests/test_cfg.py
+++ b/tests/test_cfg.py
@@ -108,6 +108,10 @@ def test_cfg_4():
import ipdb; ipdb.set_trace()
if __name__ == "__main__":
+ import sys
+
+ sys.setrecursionlimit(1000000)
+
logging.getLogger("simuvex.plugins.abstract_memory").setLevel(logging.DEBUG)
#logging.getLogger("simuvex.plugins.symbolic_memory").setLevel(logging.DEBUG)
logging.getLogger("angr.cfg").setLevel(logging.DEBUG)
|
fixed a bug in CFG that it may use unsatisfiable state to perform symbolic execution.
|
diff --git a/Controller/Wizard/EditorController.php b/Controller/Wizard/EditorController.php
index <HASH>..<HASH> 100644
--- a/Controller/Wizard/EditorController.php
+++ b/Controller/Wizard/EditorController.php
@@ -89,7 +89,6 @@ class EditorController
* name = "innova_path_editor_wizard",
* options = { "expose" = true }
* )
- * @Method("GET")
* @Template("InnovaPathBundle:Wizard:editor.html.twig")
*/
public function displayAction(Path $path)
diff --git a/Controller/Wizard/PlayerController.php b/Controller/Wizard/PlayerController.php
index <HASH>..<HASH> 100644
--- a/Controller/Wizard/PlayerController.php
+++ b/Controller/Wizard/PlayerController.php
@@ -59,7 +59,6 @@ class PlayerController
* defaults = { "stepId" = null },
* options = { "expose" = true }
* )
- * @Method("GET")
* @Template("InnovaPathBundle:Wizard:player.html.twig")
*/
public function displayAction(Path $path)
|
[PathBundle] do not restrict GET method to allow locale change in Path wizards
|
diff --git a/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php b/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php
index <HASH>..<HASH> 100644
--- a/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php
+++ b/tests/Integration/Util/Tax/IntegrationTestTaxServiceLocator.php
@@ -2,14 +2,15 @@
namespace LizardsAndPumpkins\Tax;
+use LizardsAndPumpkins\Product\Tax\TaxService;
use LizardsAndPumpkins\Product\Tax\TaxServiceLocator;
use LizardsAndPumpkins\Product\Tax\TaxServiceLocatorOptions;
class IntegrationTestTaxServiceLocator implements TaxServiceLocator
{
/**
- * @param \LizardsAndPumpkins\Product\Tax\TaxServiceLocatorOptions $options
- * @return \LizardsAndPumpkins\Product\Tax\TaxService
+ * @param TaxServiceLocatorOptions $options
+ * @return TaxService
*/
public function get(TaxServiceLocatorOptions $options)
{
|
Issue #<I>: Import classes
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ try:
except ImportError:
requirements.append("elementtree")
-version = "0.9.5"
+version = "0.9.6"
f = open("README.rst")
try:
|
BUMP <I> mostly some fixes to the c extension to work around reloading issues that came up in SW production
|
diff --git a/core/src/main/java/hudson/util/RingBufferLogHandler.java b/core/src/main/java/hudson/util/RingBufferLogHandler.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/util/RingBufferLogHandler.java
+++ b/core/src/main/java/hudson/util/RingBufferLogHandler.java
@@ -51,7 +51,7 @@ public class RingBufferLogHandler extends Handler {
int len = records.length;
records[(start+size)%len]=record;
if(size==len) {
- start++;
+ start = (start+1)%len;
} else {
size++;
}
|
[FIXED JENKINS-<I>] RingBufferLogHandler has int that needs to be reset.
|
diff --git a/validator/sawtooth_validator/consensus/notifier.py b/validator/sawtooth_validator/consensus/notifier.py
index <HASH>..<HASH> 100644
--- a/validator/sawtooth_validator/consensus/notifier.py
+++ b/validator/sawtooth_validator/consensus/notifier.py
@@ -32,13 +32,13 @@ class _NotifierService:
self._consensus_registry = consensus_registry
def notify(self, message_type, message):
- if self._consensus_registry:
- message_bytes = bytes(message)
- futures = self._service.send_all(
+ active_engine = self._consensus_registry.get_active_engine_info()
+ if active_engine is not None:
+ self._service.send(
message_type,
- message_bytes)
- for future in futures:
- future.result()
+ bytes(message),
+ active_engine.connection_id
+ ).result()
class ErrorCode(IntEnum):
|
Only send updates to active engine in notifier
Updates the ConsensusNotifier to only send updates to the active
consensus engine. Previously, it sent notifications to all consensus
engines.
|
diff --git a/resources/views/_template/master.blade.php b/resources/views/_template/master.blade.php
index <HASH>..<HASH> 100644
--- a/resources/views/_template/master.blade.php
+++ b/resources/views/_template/master.blade.php
@@ -10,6 +10,7 @@
{{ Html::script('https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js') }}
{{ Html::script('https://oss.maxcdn.com/respond/1.4.2/respond.min.js') }}
<![endif]-->
+ @yield('head')
</head>
<body class="fixed sidebar-mini skin-purple hold-transition">
<div class="wrapper">
@@ -42,6 +43,8 @@
@include('foundation::_template.sidebar-alt')
</div>
+ @yield('modals')
+
{{ Html::script('vendor/foundation/js/vendors.js') }}
{{ Html::script('vendor/foundation/js/app.js') }}
@yield('scripts')
|
Adding new sections: head & modals
|
diff --git a/structr-ui/src/main/resources/structr/js/init.js b/structr-ui/src/main/resources/structr/js/init.js
index <HASH>..<HASH> 100644
--- a/structr-ui/src/main/resources/structr/js/init.js
+++ b/structr-ui/src/main/resources/structr/js/init.js
@@ -827,7 +827,7 @@ var Structr = {
var horizontalOffset = 98;
// needs to be calculated like this because the elements in the dialogHead (tabs) are floated and thus the .height() method returns 0
- var headerHeight = dialogText.position().top - dialogHead.position().top;
+ var headerHeight = (dialogText.position().top + dialogText.scrollParent().scrollTop()) - dialogHead.position().top;
$('#dialogBox .dialogTextWrapper').css({
width: (dw - 28) + 'px',
|
Bugfix: While calculating the dialog size, take into account that the content might be scrolled. Otherwise the resulting dialog size might be a lot bigger.
|
diff --git a/templates/bootstrap/ApiRenderer.php b/templates/bootstrap/ApiRenderer.php
index <HASH>..<HASH> 100644
--- a/templates/bootstrap/ApiRenderer.php
+++ b/templates/bootstrap/ApiRenderer.php
@@ -6,6 +6,7 @@
*/
namespace yii\apidoc\templates\bootstrap;
+
use yii\apidoc\models\Context;
use yii\console\Controller;
use Yii;
diff --git a/templates/bootstrap/GuideRenderer.php b/templates/bootstrap/GuideRenderer.php
index <HASH>..<HASH> 100644
--- a/templates/bootstrap/GuideRenderer.php
+++ b/templates/bootstrap/GuideRenderer.php
@@ -6,6 +6,7 @@
*/
namespace yii\apidoc\templates\bootstrap;
+
use Yii;
use yii\helpers\Html;
diff --git a/templates/bootstrap/RendererTrait.php b/templates/bootstrap/RendererTrait.php
index <HASH>..<HASH> 100644
--- a/templates/bootstrap/RendererTrait.php
+++ b/templates/bootstrap/RendererTrait.php
@@ -1,6 +1,8 @@
<?php
/**
- * @author Carsten Brandt <mail@cebe.cc>
+ * @link http://www.yiiframework.com/
+ * @copyright Copyright (c) 2008 Yii Software LLC
+ * @license http://www.yiiframework.com/license/
*/
namespace yii\apidoc\templates\bootstrap;
|
fixed file PHPdoc
issue #<I>
|
diff --git a/examples/logical_enclosures.py b/examples/logical_enclosures.py
index <HASH>..<HASH> 100644
--- a/examples/logical_enclosures.py
+++ b/examples/logical_enclosures.py
@@ -123,3 +123,27 @@ print("Get all logical enclosures")
logical_enclosures = oneview_client.logical_enclosures.get_all()
for enc in logical_enclosures:
print(' %s' % enc['name'])
+
+if oneview_client.api_version >= 300:
+
+ if logical_enclosures:
+
+ print("Update firmware for a logical enclosure with the logical-interconnect validation set as true.")
+
+ logical_enclosure = logical_enclosures[0]
+
+ logical_enclosure_updated = oneview_client.logical_enclosures.patch(
+ id_or_uri=logical_enclosure["uri"],
+ operation="replace",
+ path="/firmware",
+ value={
+ "firmwareBaselineUri": "/rest/firmware-drivers/SPPgen9snap6_2016_0405_87",
+ "firmwareUpdateOn": "EnclosureOnly",
+ "forceInstallFirmware": "true",
+ "validateIfLIFirmwareUpdateIsNonDisruptive": "true",
+ "logicalInterconnectUpdateMode": "Orchestrated",
+ "updateFirmwareOnUnmanagedInterconnect": "true"
+ }
+ )
+
+ pprint(logical_enclosure_updated)
|
Adds an example of how to use patch for Logical Enclosures
|
diff --git a/Service/Adapter/AmazonS3.php b/Service/Adapter/AmazonS3.php
index <HASH>..<HASH> 100644
--- a/Service/Adapter/AmazonS3.php
+++ b/Service/Adapter/AmazonS3.php
@@ -207,7 +207,11 @@ class AmazonS3 implements AdapterInterface{
$headers = $this->s3->get_object_headers($this->bucketName, $this->getPath($targetFile));
$header = $headers->header;
- $ctype = $header['content-type'];
+ if ($targetFile->getMimeType() != null) {
+ $ctype = $targetFile->getMimeType();
+ } else {
+ $ctype = $header['content-type'];
+ }
header('Cache-Control: public, max-age=0');
header('Expires: '.gmdate("D, d M Y H:i:s", time())." GMT");
|
modify content-type returned by sendFileToBrowser
|
diff --git a/helios-system-tests/src/main/java/com/spotify/helios/system/ZooKeeperCuratorFailoverTest.java b/helios-system-tests/src/main/java/com/spotify/helios/system/ZooKeeperCuratorFailoverTest.java
index <HASH>..<HASH> 100644
--- a/helios-system-tests/src/main/java/com/spotify/helios/system/ZooKeeperCuratorFailoverTest.java
+++ b/helios-system-tests/src/main/java/com/spotify/helios/system/ZooKeeperCuratorFailoverTest.java
@@ -27,6 +27,7 @@ import com.spotify.helios.ZooKeeperClusterTestManager;
import org.apache.zookeeper.KeeperException;
import org.junit.After;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -35,6 +36,8 @@ import org.junit.runner.RunWith;
import static java.util.concurrent.TimeUnit.MINUTES;
import static org.junit.Assert.assertArrayEquals;
+@Ignore("This is an expensive test that tests the curator framework, not helios. " +
+ "It is disabled as it likely gives travis grief")
@RunWith(Parallelized.class)
public class ZooKeeperCuratorFailoverTest {
|
disable curator failover test
This test is only in there to build confidence that a three node
zookeeper can recover from losing a node.
It takes long time to run serially and spawns a lot of subprocesses
concurrently when run in parallel, so it likely causes problems on
travis.
|
diff --git a/docs/storage/layerwriter.go b/docs/storage/layerwriter.go
index <HASH>..<HASH> 100644
--- a/docs/storage/layerwriter.go
+++ b/docs/storage/layerwriter.go
@@ -109,6 +109,10 @@ func (lw *layerWriter) ReadFrom(r io.Reader) (n int64, err error) {
}
func (lw *layerWriter) Close() error {
+ if lw.err != nil {
+ return lw.err
+ }
+
if err := lw.storeHashState(); err != nil {
return err
}
|
Prevent Close() from being called after Finish()
|
diff --git a/trailblazer/add/core.py b/trailblazer/add/core.py
index <HASH>..<HASH> 100644
--- a/trailblazer/add/core.py
+++ b/trailblazer/add/core.py
@@ -71,7 +71,7 @@ def parse_sampleinfo(sampleinfo):
analysis_type = 'exomes' if analysis_type_raw == 'wes' else 'genomes'
analysis_start = sampleinfo['analysis_date']
analysis_out = path(sampleinfo['log_file_dir']).parent
- customer = ped_data['customer']
+ customer = ped_data['owner']
case_id = "{}-{}".format(customer, fam_key)
config_path = analysis_out.joinpath("{}_config.yaml".format(fam_key))
sacct_path = "{}.status".format(sampleinfo['last_log_file_path'])
|
parse owner/cust from ped
|
diff --git a/src/Model/User.php b/src/Model/User.php
index <HASH>..<HASH> 100644
--- a/src/Model/User.php
+++ b/src/Model/User.php
@@ -9,7 +9,6 @@ use Phwoolcon\Model;
* @package Phwoolcon\Model
*
* @property Di $_dependencyInjector
- * @property Di $_dependencyInjector
* @method UserProfile|false getUserProfile()
* @method $this setUserProfile(UserProfile $profile)
*/
|
docs: remove duplicated ide helper property in user model
|
diff --git a/src/src/com/tns/AssetExtractor.java b/src/src/com/tns/AssetExtractor.java
index <HASH>..<HASH> 100644
--- a/src/src/com/tns/AssetExtractor.java
+++ b/src/src/com/tns/AssetExtractor.java
@@ -32,7 +32,7 @@ public class AssetExtractor
}
else if (extractPolicy.shouldExtract(context))
{
- String appRoot = context.getFilesDir().getPath() + "/";
+ String appRoot = context.getFilesDir().getPath() + File.separator;
String apkPath = context.getPackageCodePath();
boolean forceOverwrite = extractPolicy.forceOverwrite();
|
little change on appRoot path generation
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -46,7 +46,7 @@ var letta = module.exports = function letta (fn, args) {
return
}
utils.relike.promise = letta.promise
- utils.relike.promisify(fn).apply(self, args).then(resolve, reject)
+ utils.relike.promisify.call(self, fn).apply(self, args).then(resolve, reject)
})
return normalizePromise(promise, Promize)
|
.call with context, close #6
|
diff --git a/server/resource_controller.go b/server/resource_controller.go
index <HASH>..<HASH> 100644
--- a/server/resource_controller.go
+++ b/server/resource_controller.go
@@ -167,7 +167,6 @@ func (rc *ResourceController) ConditionalUpdateHandler(c *gin.Context) {
c.Set("Resource", rc.Name)
c.Header("Location", responseURL(c.Request, rc.Name, id).String())
- c.Header("Access-Control-Allow-Origin", "*")
if createdNew {
c.Set("Action", "create")
c.JSON(http.StatusCreated, resource)
@@ -190,7 +189,6 @@ func (rc *ResourceController) DeleteHandler(c *gin.Context) {
c.Set("Resource", rc.Name)
c.Set("Action", "delete")
- c.Header("Access-Control-Allow-Origin", "*")
c.Status(http.StatusNoContent)
}
@@ -207,7 +205,6 @@ func (rc *ResourceController) ConditionalDeleteHandler(c *gin.Context) {
c.Set("Resource", rc.Name)
c.Set("Action", "delete")
- c.Header("Access-Control-Allow-Origin", "*")
c.Status(http.StatusNoContent)
}
|
Removed headers
Removed additional Access-Control-Allow-Origin headers that I missed on
the first pass.
|
diff --git a/test/e2e/safari/webview/web-specs.js b/test/e2e/safari/webview/web-specs.js
index <HASH>..<HASH> 100644
--- a/test/e2e/safari/webview/web-specs.js
+++ b/test/e2e/safari/webview/web-specs.js
@@ -22,7 +22,7 @@ describe('Web', function () {
const args = [{
[elType]: 5000
}];
- driver.convertElementsForAtoms(args).should.eql([{ELEMENT: 123, [util.W3C_WEB_ELEMENT_IDENTIFIER]: 123}]);
+ driver.convertElementsForAtoms(args).should.eql([{ELEMENT: 123}]);
}
});
});
|
Fix outdated test (#<I>)
|
diff --git a/lib/redlock/client.rb b/lib/redlock/client.rb
index <HASH>..<HASH> 100644
--- a/lib/redlock/client.rb
+++ b/lib/redlock/client.rb
@@ -118,8 +118,6 @@ module Redlock
else
@redis = Redis.new(connection)
end
-
- load_scripts
end
def lock(resource, val, ttl, allow_new_lock)
|
Don't load scripts on client initialization
The `recover_from_script_flush` block will load scripts if they're not
loaded yet, so there's no need to load the scripts for every new client
instantiation. The loads ought to be redundant more often than not.
|
diff --git a/bootstrap-unexpected-markdown.js b/bootstrap-unexpected-markdown.js
index <HASH>..<HASH> 100644
--- a/bootstrap-unexpected-markdown.js
+++ b/bootstrap-unexpected-markdown.js
@@ -1,6 +1,7 @@
/*global unexpected:true*/
-unexpected = require('unexpected').clone();
-unexpected.use(require('./lib/unexpected-set'));
+unexpected = require('unexpected')
+ .clone()
+ .use(require('./lib/unexpected-set'));
unexpected.output.preferredWidth = 80;
require('es6-set/implement');
|
Tidy up bootstrap-unexpected-markdown.js a bit
|
diff --git a/spec/javascripts/vec3_spec.js b/spec/javascripts/vec3_spec.js
index <HASH>..<HASH> 100644
--- a/spec/javascripts/vec3_spec.js
+++ b/spec/javascripts/vec3_spec.js
@@ -16,4 +16,15 @@ describe("vec3", function() {
expect(vec[1]).toEqual(2);
expect(vec[2]).toEqual(3);
});
+
+ describe("set", function() {
+ beforeEach(function() { vec = vec3.create() });
+
+ it("should assign values", function() {
+ vec3.set([1,2,3], vec);
+ expect(vec[0]).toEqual(1);
+ expect(vec[1]).toEqual(2);
+ expect(vec[2]).toEqual(3);
+ });
+ });
});
|
added test for vec3.set
|
diff --git a/src/Controller/Component/FilterComponent.php b/src/Controller/Component/FilterComponent.php
index <HASH>..<HASH> 100644
--- a/src/Controller/Component/FilterComponent.php
+++ b/src/Controller/Component/FilterComponent.php
@@ -656,7 +656,7 @@ class FilterComponent extends Component
$sortField['custom'] = [$sortField['custom']];
}
foreach ($sortField['custom'] as $sortEntry) {
- $options['order'][] = $sortEntry;
+ $options['order'][] = preg_replace('/:dir/', $dir, $sortEntry);
}
} else {
$options['order'][] = $sortField['modelField'] . ' ' . $dir;
|
enable dynamic sort directions for custom sort options by using ":dir"
|
diff --git a/install-pngcrush.js b/install-pngcrush.js
index <HASH>..<HASH> 100755
--- a/install-pngcrush.js
+++ b/install-pngcrush.js
@@ -9,7 +9,7 @@
// Credit to Obvious Corp for finding this fix.
var originalPath = process.env.PATH;
// NPM adds bin directories to the path, which will cause `which` to find the
- // bin for this package not the actual phantomjs bin.
+ // bin for this package not the actual pngcrush bin.
process.env.PATH = originalPath.replace(/:[^:]*node_modules[^:]*/g, '');
try {
|
This comment was kept because the code was found by somebody else, changing the comment slightly
|
diff --git a/dtool_create/dataset.py b/dtool_create/dataset.py
index <HASH>..<HASH> 100644
--- a/dtool_create/dataset.py
+++ b/dtool_create/dataset.py
@@ -329,6 +329,12 @@ def show(dataset_uri):
@proto_dataset_uri_argument
@click.argument('input', type=click.File('r'))
def write(proto_dataset_uri, input):
+ """Use YAML from a file or stdin to populate the readme.
+
+ To stream content from stdin use "-", e.g.
+
+ echo "desc: my data" | dtool readme write <DS_URI> -
+ """
proto_dataset = dtoolcore.ProtoDataSet.from_uri(
uri=proto_dataset_uri
)
|
Add docstring to 'dtool readme write'
|
diff --git a/db/migrate/20150331132115_remove_old_permissions.rb b/db/migrate/20150331132115_remove_old_permissions.rb
index <HASH>..<HASH> 100644
--- a/db/migrate/20150331132115_remove_old_permissions.rb
+++ b/db/migrate/20150331132115_remove_old_permissions.rb
@@ -2,12 +2,12 @@ class RemoveOldPermissions < ActiveRecord::Migration
def up
# remove invalid permissions causing http://projects.theforeman.org/issues/9963
perms = Permission.where("name like '%_discovered_hosts' and resource_type is null").destroy_all
- puts "Removed invalid permissions: #{perms.inspect}" if perms.size > 0
+ say "Removed invalid permissions: #{perms.inspect}" if perms.size > 0
# unassociate and remove unused role "Discovery" (renamed to "Discovery Manager")
if old_role = Role.where(:name => "Discovery").first
UserRole.where(:role_id => old_role.id).destroy_all
- puts "Role 'Discovery' was removed, use 'Discovery Manager' instead" if old_role.destroy
+ say "Role 'Discovery' was removed, use 'Discovery Manager' instead" if old_role.destroy
end
end
|
Refs #<I> - changing puts to say in permissions migration
|
diff --git a/lib/websearch_external_collections_getter_tests.py b/lib/websearch_external_collections_getter_tests.py
index <HASH>..<HASH> 100644
--- a/lib/websearch_external_collections_getter_tests.py
+++ b/lib/websearch_external_collections_getter_tests.py
@@ -39,8 +39,9 @@ class AsyncDownloadTest(unittest.TestCase):
## - test 1 unresolvable name : rjfreijoiregjreoijgoirg.fr
## - test 1 bad ip : 1.2.3.4
## Return the list of errors.
-
- checks = [ {'url': 'http://public.web.cern.ch/public/', 'content': "<title>CERN - The world's largest particle physics laboratory</title>"},
+ # {'url': 'http://public.web.cern.ch/public/', 'content': "<title>CERN - The world's largest particle physics laboratory</title>"},
+ checks = [
+ {'url': 'http://cdsware.cern.ch/invenio/index.html', 'content': '<title>CDS Invenio: Overview</title>'},
{'url': 'http://cdsware.cern.ch/invenio/index.html', 'content': '<title>CDS Invenio: Overview</title>'},
{'url': 'http://rjfreijoiregjreoijgoirg.fr'},
{'url': 'http://1.2.3.4/'} ]
|
demobibdata with citation stuff. adjusted the tests
|
diff --git a/crawler.js b/crawler.js
index <HASH>..<HASH> 100644
--- a/crawler.js
+++ b/crawler.js
@@ -174,6 +174,9 @@ Crawler.prototype._crawlUrl = function(url, referer, depth) {
if ((depth === 0) || this.knownUrls[url]) {
return;
}
+
+ this.knownUrls[url] = true;
+
var self = this;
this._startedCrawling(url);
@@ -189,7 +192,6 @@ Crawler.prototype._crawlUrl = function(url, referer, depth) {
//If no redirects, then response.request.uri.href === url, otherwise last url
var lastUrlInRedirectChain = response.request.uri.href;
if (self.shouldCrawl(lastUrlInRedirectChain)) {
- self.knownUrls[url] = true;
_.each(this.redirects, function(redirect) {
self.knownUrls[redirect.redirectUri] = true;
});
|
Sets knownUrls immediately in _crawlUrl to avoid re-crawling failed urls
|
diff --git a/dataviews/options.py b/dataviews/options.py
index <HASH>..<HASH> 100644
--- a/dataviews/options.py
+++ b/dataviews/options.py
@@ -128,12 +128,14 @@ class Options(object):
def __call__(self, obj):
- if not hasattr(obj, 'style'):
- raise Exception('Supplied object requires style attribute.')
+
+ if isinstance(obj, str):
+ name = obj
elif isinstance(obj.style, list):
return self.opt_type()
+ else:
+ name = obj.style
- name = obj.style
matches = sorted((len(key), style) for key, style in self._items.items()
if name.endswith(key))
if matches == []:
|
Options can now be generated by string in __call__ methods
|
diff --git a/brother_ql/raster.py b/brother_ql/raster.py
index <HASH>..<HASH> 100644
--- a/brother_ql/raster.py
+++ b/brother_ql/raster.py
@@ -186,7 +186,7 @@ class BrotherQLRaster(object):
def add_raster_data(self, image, second_image=None):
""" image: Pillow Image() """
- logger.info("raster_image_size: {0}x{1}".format(*image.size))
+ logger.debug("raster_image_size: {0}x{1}".format(*image.size))
if image.size[0] != self.get_pixel_width():
fmt = 'Wrong pixel width: {}, expected {}'
raise BrotherQLRasterError(fmt.format(image.size[0], self.get_pixel_width()))
|
BrotherQLRaster: log raster_image_size as debug, not info
|
diff --git a/codebase/base_connector.php b/codebase/base_connector.php
index <HASH>..<HASH> 100644
--- a/codebase/base_connector.php
+++ b/codebase/base_connector.php
@@ -230,7 +230,7 @@ class DataItem{
@return
escaped string
*/
- protected function xmlentities($string) {
+ public function xmlentities($string) {
return str_replace( array( '&', '"', "'", '<', '>', '’' ), array( '&' , '"', ''' , '<' , '>', ''' ), $string);
}
|
[fix] set xmlentities to public, must fix some backward compatibility issues
|
diff --git a/tests/unit/Codeception/Module/BeanstalkdTest.php b/tests/unit/Codeception/Module/BeanstalkdTest.php
index <HASH>..<HASH> 100644
--- a/tests/unit/Codeception/Module/BeanstalkdTest.php
+++ b/tests/unit/Codeception/Module/BeanstalkdTest.php
@@ -19,7 +19,7 @@ class Beanstalkd_Test extends \PHPUnit_Framework_TestCase
{
$this->module = new \Codeception\Module\Queue(make_container());
$this->module->_setConfig($this->config);
- $this->module->_before(Stub::makeEmpty('\Codeception\TestCase'));
+ $this->module->_before(Stub::makeEmpty('\Codeception\TestInterface'));
try {
$this->module->clearQueue('default');
} catch (ConnectionException $e) {
|
Pass correct stub to _before hook of Beanstalkd module
|
diff --git a/lib/Doctrine/DBAL/Migrations/Version.php b/lib/Doctrine/DBAL/Migrations/Version.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Migrations/Version.php
+++ b/lib/Doctrine/DBAL/Migrations/Version.php
@@ -148,8 +148,18 @@ class Version
public function markMigrated()
{
+ $this->markVersion('up');
+ }
+
+ private function markVersion($direction)
+ {
+ if ($direction == 'up') {
+ $action = 'insert';
+ } else {
+ $action = 'delete';
+ }
$this->configuration->createMigrationTable();
- $this->connection->insert(
+ $this->connection->$action(
$this->configuration->getMigrationsTableName(),
[$this->configuration->getMigrationsColumnName() => $this->version]
);
@@ -157,11 +167,7 @@ class Version
public function markNotMigrated()
{
- $this->configuration->createMigrationTable();
- $this->connection->delete(
- $this->configuration->getMigrationsTableName(),
- [$this->configuration->getMigrationsColumnName() => $this->version]
- );
+ $this->markVersion('down');
}
/**
|
refactoring the mark version migrated / not migrated code
|
diff --git a/tests/gui/widget/test_history.py b/tests/gui/widget/test_history.py
index <HASH>..<HASH> 100644
--- a/tests/gui/widget/test_history.py
+++ b/tests/gui/widget/test_history.py
@@ -181,6 +181,7 @@ def create_sm_model(with_gui=False, add_state_machine=False):
# TODO introduce test_add_remove_history with_gui=True to have a more reliable unit-test
def test_add_remove_history(caplog):
+ testing_utils.dummy_gui(None)
##################
# Root_state elements
|
fix(test_history): Add missing call to dummy_gui in test_add_remove_hist
|
diff --git a/src/Munee/Asset/Type/Css.php b/src/Munee/Asset/Type/Css.php
index <HASH>..<HASH> 100644
--- a/src/Munee/Asset/Type/Css.php
+++ b/src/Munee/Asset/Type/Css.php
@@ -173,7 +173,8 @@ class Css extends Type
$changedContent = preg_replace_callback($regEx, function ($match) use ($originalFile, $webroot) {
$filePath = trim($match[2]);
// Skip conversion if the first character is a '/' since it's already an absolute path
- if ($filePath[0] !== '/') {
+ // Also skip conversion if the string has an protocol in url
+ if ($filePath[0] !== '/' && strpos($filePath, '://') === false) {
$basePath = SUB_FOLDER . str_replace($webroot, '', dirname($originalFile));
$basePathParts = array_reverse(array_filter(explode('/', $basePath)));
$numOfRecursiveDirs = substr_count($filePath, '../');
|
Ignore urls with protocols in CSS.
|
diff --git a/help_text.php b/help_text.php
index <HASH>..<HASH> 100644
--- a/help_text.php
+++ b/help_text.php
@@ -31,9 +31,7 @@
define('WT_SCRIPT_NAME', 'help_text.php');
require './includes/session.php';
-Zend_Session::writeClose();
-
-$controller=new WT_Controller_Simple();
+$controller=new WT_Controller_Ajax();
$help=safe_GET('help');
switch ($help) {
@@ -1862,11 +1860,7 @@ default:
break;
}
-$controller->setPageTitle($title);
$controller->pageHeader();
echo '<div class="helpheader">', $title, '</div>';
echo '<div class="helpcontent">', $text,'</div>';
-//echo '<div class="helpfooter">';
-//echo '<a href="#" onclick="window.close();">', WT_I18N::translate('Close Window'), '</a>';
-// '</div>';
|
help_text.php is now an AJAX response, rather than a popup window, so send the correct headers.
|
diff --git a/dolo/compiler/compiler_python.py b/dolo/compiler/compiler_python.py
index <HASH>..<HASH> 100644
--- a/dolo/compiler/compiler_python.py
+++ b/dolo/compiler/compiler_python.py
@@ -25,6 +25,7 @@ class GModel(object):
calibration = None
functions = None
symbols = None
+ infos = dict()
@property
def variables(self):
@@ -56,6 +57,11 @@ class GModel(object):
self.model_type = self.recipe['model_type']
+ self.infos['model_type'] = self.model_type
+ self.infos['data_layout'] = order
+
+ # TODO: find a good name to replace "data_layout"
+
self.__create_functions__(compiler, order=order)
def __create_functions__(self, compiler, order='rows'):
|
Added infos structure to python models.
|
diff --git a/test_schema.py b/test_schema.py
index <HASH>..<HASH> 100644
--- a/test_schema.py
+++ b/test_schema.py
@@ -445,8 +445,6 @@ def test_optional_key_convert_failed_randomly_while_with_another_optional_object
'created_at': '2015-10-10 00:00:00'
}
validated_data = s.validate(data)
- if not isinstance(validated_data['created_at'], datetime.datetime):
- print "'Optiona(created_at)'convert failed at {count}".format(count=i+1)
# is expected to be converted to a datetime instance, but fails randomly(most of the time)
assert isinstance(validated_data['created_at'], datetime.datetime)
# assert isinstance(validated_data['created_at'], basestring)
|
Remove print for py3+
|
diff --git a/pkg/drivers/kvm/gpu.go b/pkg/drivers/kvm/gpu.go
index <HASH>..<HASH> 100644
--- a/pkg/drivers/kvm/gpu.go
+++ b/pkg/drivers/kvm/gpu.go
@@ -62,7 +62,7 @@ type PCIDevice struct {
func getDevicesXML() (string, error) {
unboundNVIDIADevices, err := getPassthroughableNVIDIADevices()
if err != nil {
- return "", fmt.Errorf("coundn't generate devices XML: %v", err)
+ return "", fmt.Errorf("couldn't generate devices XML: %v", err)
}
var pciDevices []PCIDevice
for _, device := range unboundNVIDIADevices {
|
Correct typo in the returned message
coundn't->couldn't
|
diff --git a/lib/extract_jwt.js b/lib/extract_jwt.js
index <HASH>..<HASH> 100644
--- a/lib/extract_jwt.js
+++ b/lib/extract_jwt.js
@@ -40,7 +40,7 @@ extractors.fromUrlQueryParameter = function (param_name) {
return function (request) {
var token = null,
parsed_url = url.parse(request.url, true);
- if (parsed_url.query && parsed_url.query.hasOwnProperty(param_name)) {
+ if (parsed_url.query && Object.prototype.hasOwnProperty.call(parsed_url.query, param_name)) {
token = parsed_url.query[param_name];
}
return token;
|
Switch to using hasOwnProperty from the object prototype since the response from url.parse no longer inherits from it.
|
diff --git a/src/Ouzo/Goodies/Tests/CatchException.php b/src/Ouzo/Goodies/Tests/CatchException.php
index <HASH>..<HASH> 100644
--- a/src/Ouzo/Goodies/Tests/CatchException.php
+++ b/src/Ouzo/Goodies/Tests/CatchException.php
@@ -8,6 +8,22 @@ namespace Ouzo\Tests;
use Throwable;
+/**
+ * Class CatchException can be used as alternative to try{...}catch(...){...} block in tests.
+ * It can be used in presented way:
+ *
+ * class ThrowableClass{
+ * public function throwableMethod(){...}
+ * }
+ *
+ * $throwableObject = new ThrowableClass();
+ *
+ * CatchException::when($throwableObject)->throwableMethod();
+ *
+ * CatchException::assertThat()->isInstanceOf(ThrowableClass::class);
+ *
+ * @package Ouzo\Tests
+ */
class CatchException
{
/** @var Throwable|null */
|
Few words of docs in CatchException class
|
diff --git a/lib/manager.js b/lib/manager.js
index <HASH>..<HASH> 100644
--- a/lib/manager.js
+++ b/lib/manager.js
@@ -1,4 +1,3 @@
-
/*!
* socket.io-node
* Copyright(c) 2011 LearnBoost <dev@learnboost.com>
@@ -821,9 +820,9 @@ Manager.prototype.handshakeData = function (data) {
, connectionAddress;
if (connection.address) {
- connectionAddress = connection.address();
+ connectionAddress = connection.remoteAddress; // Bug fix, returns client IP instead of .address() which was returning server IP
} else if (connection.socket && connection.socket.address) {
- connectionAddress = connection.socket.address()
+ connectionAddress = connection.socket.address(); // Do we need .remoteAddress here too?
}
return {
|
Updated Manager.prototype.handshakeData to provide connection.remoteAddress instead of .address() because .address() was returning server IP and .remoteAddress returns client IP.
|
diff --git a/client/request.php b/client/request.php
index <HASH>..<HASH> 100644
--- a/client/request.php
+++ b/client/request.php
@@ -21,7 +21,9 @@ class Request {
// ensure params are utf8
if ($params !== null) {
foreach ($params as &$param) {
- $param = utf8_encode($param);
+ if(is_string($param)){
+ $param = utf8_encode($param);
+ }
}
}
|
Only UTF8 encode strings to preserve other data types
|
diff --git a/scapy/volatile.py b/scapy/volatile.py
index <HASH>..<HASH> 100644
--- a/scapy/volatile.py
+++ b/scapy/volatile.py
@@ -295,7 +295,7 @@ class RandIP6(RandString):
remain = random.randint(0,remain)
for j in range(remain):
ip.append("%04x" % random.randint(0,65535))
- if n == 0:
+ elif n == 0:
ip.append("0")
elif not n:
ip.append("")
|
RandIP6() with default '**' fails, this seems to do the right thing
|
diff --git a/clam/clamdispatcher.py b/clam/clamdispatcher.py
index <HASH>..<HASH> 100755
--- a/clam/clamdispatcher.py
+++ b/clam/clamdispatcher.py
@@ -261,6 +261,7 @@ def main():
if os.path.exists(projectdir + '.pid'): os.unlink(projectdir + '.pid')
#update project index cache
+ print("[CLAM Dispatcher] Updating project index", file=sys.stderr)
updateindex(projectdir)
|
a bit more verbosity
|
diff --git a/server/sonar-web/src/main/js/apps/issues/models/issue.js b/server/sonar-web/src/main/js/apps/issues/models/issue.js
index <HASH>..<HASH> 100644
--- a/server/sonar-web/src/main/js/apps/issues/models/issue.js
+++ b/server/sonar-web/src/main/js/apps/issues/models/issue.js
@@ -4,9 +4,7 @@ define([
return Issue.extend({
reset: function (attrs, options) {
- // TODO remove me soon
- var keepFields = ['index', 'selected', 'componentUuid', 'componentLongName', 'componentQualifier',
- 'projectLongName', 'projectUuid', 'ruleName', 'comments'];
+ var keepFields = ['index', 'selected', 'comments'];
keepFields.forEach(function (field) {
attrs[field] = this.get(field);
}.bind(this));
|
SONAR-<I> decrease the list of kept issue fields
|
diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Console/Command/Task/ProjectTask.php
+++ b/lib/Cake/Console/Command/Task/ProjectTask.php
@@ -388,7 +388,7 @@ class ProjectTask extends Shell {
))->addOption('empty', array(
'help' => __d('cake_console', 'Create empty files in each of the directories. Good if you are using git')
))->addOption('skel', array(
- 'default' => current(App::core('Console')) . DS . 'templates' . DS . 'skel',
+ 'default' => current(App::core('Console')) . 'templates' . DS . 'skel',
'help' => __d('cake_console', 'The directory layout to use for the new application skeleton. Defaults to cake/console/templates/skel of CakePHP used to create the project.')
));
}
|
removing DS, App::core('Console') already ends with DS
|
diff --git a/test/ssl_test.js b/test/ssl_test.js
index <HASH>..<HASH> 100644
--- a/test/ssl_test.js
+++ b/test/ssl_test.js
@@ -126,7 +126,7 @@ test('before cert expiration, fallback to newest cert bundle and stick if node d
TestHelper.config.instrumental.tlsVariationTimeout = 500;
- var timeBetweenSends = 1000;
+ var timeBetweenSends = 2000;
var actions = [];
// node default certs
@@ -229,7 +229,7 @@ test('after cert expiration, fallback to newest cert bundle and stick if node de
TestHelper.config.instrumental.tlsVariationTimeout = 500;
- var timeBetweenSends = 1000;
+ var timeBetweenSends = 2000;
var actions = [];
// node default certs
|
Fix intermittent test failures
There seems to be occasional failures with these tests related to timing
issues. This adds some additional buffer time and seems to resolve the
issues.
|
diff --git a/core/core.js b/core/core.js
index <HASH>..<HASH> 100644
--- a/core/core.js
+++ b/core/core.js
@@ -428,7 +428,8 @@ exports._setup = function() {
_globals.core.Item.prototype.addChild = function(child) {
_globals.core.Object.prototype.addChild.apply(this, arguments)
if ('_tryFocus' in child)
- child._tryFocus()
+ if (child._tryFocus())
+ this._propagateFocusToParents()
}
_globals.core.Item.prototype._update = function(name, value) {
@@ -502,7 +503,7 @@ exports._setup = function() {
_globals.core.Item.prototype._propagateFocusToParents = function() {
var item = this;
- while(item.parent && !item.parent.focusedChild) {
+ while(item.parent && (!item.parent.focusedChild || !item.parent.focusedChild.visible)) {
item.parent._focusChild(item)
item = item.parent
}
|
propagate focus over invisible childs and from addChild
|
diff --git a/classes/Tools/Storage/StorageTool.php b/classes/Tools/Storage/StorageTool.php
index <HASH>..<HASH> 100755
--- a/classes/Tools/Storage/StorageTool.php
+++ b/classes/Tools/Storage/StorageTool.php
@@ -3011,7 +3011,11 @@ class StorageTool extends Tool
public function handleSmushImageOptimizer( $postId, $stats )
{
- $this->handleImageOptimizer( $postId );
+ // wp_smush_image_optimised runs inside of a wp_update_attachment_metadata
+ // filter hook, so any metadata written by processImport will be overwritten.
+ // We'll use the standard handleUpdateAttachmentMetadata() method to handle
+ // the upload instead.
+ $this->processingOptimized = true;
}
public function handleImagifyImageOptimizer( $postId, $data )
|
fix: Media Cloud metadata is not saved when Smush is active
fixes #<I>
|
diff --git a/fakeca_test.go b/fakeca_test.go
index <HASH>..<HASH> 100644
--- a/fakeca_test.go
+++ b/fakeca_test.go
@@ -155,7 +155,10 @@ func TestPFX(t *testing.T) {
}
func assertNoPanic(t *testing.T, cb func()) {
- t.Helper()
+ // Check that t.Helper() is defined for Go<1.9
+ if h, ok := interface{}(t).(interface{ Helper() }); ok {
+ h.Helper()
+ }
defer func() {
if r := recover(); r != nil {
|
*testing.T doesn't have Helper() method before go <I>
|
diff --git a/lib/comfortable_mexican_sofa/form_builder.rb b/lib/comfortable_mexican_sofa/form_builder.rb
index <HASH>..<HASH> 100644
--- a/lib/comfortable_mexican_sofa/form_builder.rb
+++ b/lib/comfortable_mexican_sofa/form_builder.rb
@@ -43,7 +43,7 @@ class ComfortableMexicanSofa::FormBuilder < ActionView::Helpers::FormBuilder
end
def label_for(field, options={})
- label = options.delete(:label) || object.class.human_attribute_name(field).capitalize
+ label = options.delete(:label) || object.class.human_attribute_name(field)
for_value = options[:id] || "#{object_name}_#{field}"
%Q{<label for="#{for_value}">#{label}</label>}.html_safe
end
|
Removed annoying capitalize from labels in sofa's form builder.
|
diff --git a/lib/mongodb/connection/connection.js b/lib/mongodb/connection/connection.js
index <HASH>..<HASH> 100644
--- a/lib/mongodb/connection/connection.js
+++ b/lib/mongodb/connection/connection.js
@@ -12,7 +12,7 @@ var Connection = exports.Connection = function(id, socketOptions) {
// Store all socket options
this.socketOptions = socketOptions ? socketOptions : {host:'localhost', port:27017, domainSocket:false};
// Set keep alive default if not overriden
- if(!this.socketOptions.keepAlive && process.platform !== "sunos") this.socketOptions.keepAlive = 100;
+ if(!this.socketOptions.keepAlive && (process.platform !== "sunos" || process.platform !== "win32")) this.socketOptions.keepAlive = 100;
// Id for the connection
this.id = id;
// State of the connection
|
disabled keepalive by default for win<I>
|
diff --git a/shoebot/data/bezier.py b/shoebot/data/bezier.py
index <HASH>..<HASH> 100644
--- a/shoebot/data/bezier.py
+++ b/shoebot/data/bezier.py
@@ -272,7 +272,7 @@ class ClippingPath(BezierPath):
class EndClip(Grob):
def __init__(self, canvas, **kwargs):
- Grob.__init__(canvas = canvas)
+ Grob.__init__(self, canvas = canvas)
def _render(self, ctx):
pass
|
Wasn't passing self to EndClip
|
diff --git a/scripts/merge-pr.py b/scripts/merge-pr.py
index <HASH>..<HASH> 100755
--- a/scripts/merge-pr.py
+++ b/scripts/merge-pr.py
@@ -297,11 +297,17 @@ if not bool(pr["mergeable"]):
continue_maybe(msg)
print("\n=== Pull Request #%s ===" % pr_num)
+
+# we may have un-printable unicode in our title
+try:
+ title = title.encode('raw_unicode_escape')
+except Exception:
+ pass
+
print("title\t{title}\nsource\t{source}\ntarget\t{target}\nurl\t{url}".format(
title=title, source=pr_repo_desc, target=target_ref, url=url))
-
merged_refs = [target_ref]
print("\nProceed with updating or merging pull request #%s?" % pr_num)
|
ADMIN: edit in merge-pr script to handle unicode titles
|
diff --git a/src/actions/GlideAction.php b/src/actions/GlideAction.php
index <HASH>..<HASH> 100644
--- a/src/actions/GlideAction.php
+++ b/src/actions/GlideAction.php
@@ -5,6 +5,7 @@ namespace trntv\glide\actions;
use Symfony\Component\HttpFoundation\Request;
use Yii;
use yii\base\Action;
+use yii\web\Response;
use yii\base\NotSupportedException;
use yii\web\BadRequestHttpException;
use yii\web\NotFoundHttpException;
@@ -39,6 +40,7 @@ class GlideAction extends Action
}
try {
+ Yii::$app->getResponse()->format = Response::FORMAT_RAW;
$this->getServer()->outputImage($path, Yii::$app->request->get());
} catch (\Exception $e) {
throw new NotSupportedException($e->getMessage());
|
fix image show problem
directly browser url like '<URL>
|
diff --git a/test/timezone_test.rb b/test/timezone_test.rb
index <HASH>..<HASH> 100644
--- a/test/timezone_test.rb
+++ b/test/timezone_test.rb
@@ -33,6 +33,7 @@ class TimezoneTest < Test::Unit::TestCase
def test_getting_utc_offset
assert_equal 36000, Timezone::Zone.new(:zone => 'Australia/Sydney').utc_offset
assert_equal -28800, Timezone::Zone.new(:zone => 'America/Los_Angeles').utc_offset
+ assert_equal 20700, Timezone::Zone.new(:zone => 'Asia/Kathmandu').utc_offset
end
def test_loading_GMT_timezone
|
Added a test for utc_offset in half zones as well.
|
diff --git a/cassandra/query.py b/cassandra/query.py
index <HASH>..<HASH> 100644
--- a/cassandra/query.py
+++ b/cassandra/query.py
@@ -100,8 +100,8 @@ class Statement(object):
def _set_routing_key(self, key):
if isinstance(key, (list, tuple)):
- self._routing_key = "".join(struct.pack("HsB", len(component), component, 0)
- for component in key)
+ self._routing_key = b"".join(struct.pack("HsB", len(component), component, 0)
+ for component in key)
else:
self._routing_key = key
@@ -358,7 +358,7 @@ class BoundStatement(Statement):
val = self.values[statement_index]
components.append(struct.pack("HsB", len(val), val, 0))
- self._routing_key = "".join(components)
+ self._routing_key = b"".join(components)
return self._routing_key
|
Use bytes literals for joining routing key components
|
diff --git a/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java b/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java
index <HASH>..<HASH> 100644
--- a/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java
+++ b/entity-store/src/main/java/jetbrains/exodus/entitystore/PersistentEntityStoreImpl.java
@@ -1701,6 +1701,7 @@ public class PersistentEntityStoreImpl implements PersistentEntityStore, FlushLo
}
entityTypes.logOperations(txn, flushLog);
propertyIds.logOperations(txn, flushLog);
+ propertyCustomTypeIds.logOperations(txn, flushLog);
linkIds.logOperations(txn, flushLog);
for (final TableCreationOperation op : tableCreationLog) {
op.persist(txn);
|
#XD-<I> fixed
|
diff --git a/tests/test_apps/kafkaimporter/client/kafkaimporter/KafkaImportBenchmark.java b/tests/test_apps/kafkaimporter/client/kafkaimporter/KafkaImportBenchmark.java
index <HASH>..<HASH> 100644
--- a/tests/test_apps/kafkaimporter/client/kafkaimporter/KafkaImportBenchmark.java
+++ b/tests/test_apps/kafkaimporter/client/kafkaimporter/KafkaImportBenchmark.java
@@ -365,10 +365,18 @@ public class KafkaImportBenchmark {
long importRowCount = MatchChecks.getImportRowCount(client);
boolean testResult = true;
+ // so counts that might help debugging....
+ log.info("mirrorRows: " + mirrorRows);
+ log.info("importRows: " + importRows);
+ log.info("importRowCount: " + importRowCount);
+ if (config.useexport) {
+ log.info("exportRowCount: " + exportRowCount);
+ }
+
if (config.useexport) {
log.info("Total rows exported: " + finalInsertCount);
log.info("Unmatched Rows remaining in the export Mirror Table: " + mirrorRows);
- log.info("Unmatched Rows received from Kafka to Import Table (duplicate rows): " + importRowCount);
+ log.info("Unmatched Rows received from Kafka to Import Table (duplicate rows): " + importRows);
if (mirrorRows != 0) {
log.error(mirrorRows + " Rows are missing from the import stream, failing test");
|
ENG-<I>, release <I>.x: straightening out some mix ups
|
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index <HASH>..<HASH> 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -488,7 +488,7 @@ class Plugin(object):
self.soslog.warning("command '%s' timed out after %ds"
% (prog, timeout))
if status == 127:
- self.soslog.warning("could not run '%s': command not found" % prog)
+ self.soslog.info("could not run '%s': command not found" % prog)
return (status, output, runtime)
def call_ext_prog(self, prog, timeout=300):
diff --git a/sos/sosreport.py b/sos/sosreport.py
index <HASH>..<HASH> 100644
--- a/sos/sosreport.py
+++ b/sos/sosreport.py
@@ -659,6 +659,7 @@ class SoSReport(object):
flog.setLevel(logging.DEBUG)
elif self.opts.verbosity and self.opts.verbosity > 0:
console.setLevel(logging.INFO)
+ flog.setLevel(logging.DEBUG)
else:
console.setLevel(logging.WARNING)
self.soslog.addHandler(console)
|
Fix verbose file logging
Prior versions of sos enable debug logging to the embedded log
file (sos_logs/sos.log) when a single '-v' is given. Restore this
behaviour and ensure that command-not-found messages are reported
at 'info' rather than 'warning' level.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -69,7 +69,7 @@ setup(name='django-defender',
include_package_data=True,
packages=get_packages('defender'),
package_data=get_package_data('defender'),
- install_requires=['Django>=1.6,<1.9', 'redis==2.10.3',
+ install_requires=['Django>=1.6,<1.10', 'redis==2.10.3',
'hiredis==0.2.0', 'mockredispy==2.9.0.11'],
tests_require=['mock', 'mockredispy', 'coverage', 'celery'],
)
|
Django <I> is supported in installation requirements.
|
diff --git a/gpcharts.py b/gpcharts.py
index <HASH>..<HASH> 100644
--- a/gpcharts.py
+++ b/gpcharts.py
@@ -8,7 +8,7 @@
# Python3 compatibility
import sys
python_version = sys.version_info[0]
-if python_version == 3:
+if python_version >= 3:
try:
from past.builtins import xrange
except ImportError:
|
Fixing Python 4 compatibility issue
It is presumed that Python4 will be mostly, if not completely, backwards
compatible with Python3. At the same time, it will not revert to Python2
compatibility. As such, Python3 patches like this should also be written to be
seen by future versions of Python.
|
diff --git a/examples/example_filter_listbox.py b/examples/example_filter_listbox.py
index <HASH>..<HASH> 100644
--- a/examples/example_filter_listbox.py
+++ b/examples/example_filter_listbox.py
@@ -2,8 +2,9 @@
# This example shows how to change the items of a ListBox widget
# when the current selection of a DropDown widget changes.
#
-from picotui.screen import *
+from picotui.screen import Screen
from picotui.widgets import *
+from picotui.defs import *
if __name__ == "__main__":
|
examples/example_filter_listbox: Clean up imports, import defs.
|
diff --git a/bot/action/standard/logger.py b/bot/action/standard/logger.py
index <HASH>..<HASH> 100644
--- a/bot/action/standard/logger.py
+++ b/bot/action/standard/logger.py
@@ -1,6 +1,7 @@
from bot.action.core.action import IntermediateAction
from bot.logger.logger import LoggerFactory
from bot.logger.message_sender.factory import MessageSenderFactory
+from bot.logger.worker_logger import WorkerStartStopLogger
class LoggerAction(IntermediateAction):
@@ -22,6 +23,12 @@ class LoggerAction(IntermediateAction):
def post_setup(self):
self.sender_builder.with_api(self.api)
self.logger = self.new_logger(self.config.log_chat_id)
+ self.__update_scheduler_callbacks()
+
+ def __update_scheduler_callbacks(self):
+ # update scheduler callbacks to use this logger instead of the admin one
+ worker_logger = WorkerStartStopLogger(self.logger)
+ self.scheduler.set_callbacks(worker_logger.worker_start, worker_logger.worker_stop)
def new_logger(self, chat_id, logger_type: str = None, reuse_max_length: int = None, reuse_max_time: int = None,
async: bool = None):
|
Update scheduler callbacks to use LoggerAction logger once it is created
|
diff --git a/graphistry/plotter.py b/graphistry/plotter.py
index <HASH>..<HASH> 100644
--- a/graphistry/plotter.py
+++ b/graphistry/plotter.py
@@ -71,6 +71,11 @@ class Plotter(object):
else:
g = graph
n = self.nodes if nodes is None else nodes
+
+ if self.source is None or self.destination is None:
+ raise ValueError('Source/destination must be bound before plotting.')
+ if n is not None and self.node is None:
+ raise ValueError('Node identifier must be bound when using node dataframe')
dataset = self._plot_dispatch(g, n)
if dataset is None:
raise TypeError('Expected Pandas dataframe or Igraph graph')
|
NewAPI: Check that at least source/dest are bound before attempting to plot
|
diff --git a/public/javascripts/wymeditor/jquery.refinery.wymeditor.js b/public/javascripts/wymeditor/jquery.refinery.wymeditor.js
index <HASH>..<HASH> 100755
--- a/public/javascripts/wymeditor/jquery.refinery.wymeditor.js
+++ b/public/javascripts/wymeditor/jquery.refinery.wymeditor.js
@@ -2437,7 +2437,8 @@ WYMeditor.XhtmlValidator = {
"allowscriptaccess",
"wmode",
"type",
- "src"
+ "src",
+ "flashvars"
],
"inside":"object"
},
|
support flashvars in an embed code
|
diff --git a/spec/features/translations_spec.rb b/spec/features/translations_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/features/translations_spec.rb
+++ b/spec/features/translations_spec.rb
@@ -99,13 +99,11 @@ describe "translations" do
expect(page).to have_content("Language")
locales.each{|locale| expect(page).to have_css("select#locale option[value=#{locale}]")}
select("es", from: "locale")
- wait_for_ajax
expect(page).to have_content("Un idioma nunca es suficiente")
expect(page).to have_content("¿Cómo se llama Usted?")
click_button "Dos"
expect(page).to have_content("¿Cuál es tu color favorito?")
select("he", from: "locale")
- wait_for_ajax
expect(page).to have_content("מהו הצבע האהוב עליך?")
end
context "without translations" do
|
removing 'wait for ajax' in js testing
|
diff --git a/lxd/patches.go b/lxd/patches.go
index <HASH>..<HASH> 100644
--- a/lxd/patches.go
+++ b/lxd/patches.go
@@ -3464,7 +3464,7 @@ var legacyPatches = map[int](func(d *Daemon) error){
30: patchUpdateFromV29,
31: patchUpdateFromV30,
}
-var legacyPatchesNeedingDB = []int{11, 12, 16} // Legacy patches doing DB work
+var legacyPatchesNeedingDB = []int{11, 16} // Legacy patches doing DB work
func patchUpdateFromV10(d *Daemon) error {
if shared.PathExists(shared.VarPath("lxc")) {
@@ -3483,13 +3483,15 @@ func patchUpdateFromV10(d *Daemon) error {
}
func patchUpdateFromV11(d *Daemon) error {
- cNames, err := d.cluster.LegacyContainersList(db.CTypeSnapshot)
+ containers, err := containersOnDisk()
if err != nil {
return err
}
errors := 0
+ cNames := containers["default"]
+
for _, cName := range cNames {
snapParentName, snapOnlyName, _ := containerGetParentAndSnapshotName(cName)
oldPath := shared.VarPath("containers", snapParentName, "snapshots", snapOnlyName)
|
Don't use the db in legacy patch <I>
|
diff --git a/src/layers/cip/objects/Connection.js b/src/layers/cip/objects/Connection.js
index <HASH>..<HASH> 100644
--- a/src/layers/cip/objects/Connection.js
+++ b/src/layers/cip/objects/Connection.js
@@ -609,11 +609,18 @@ const InstanceAttributeDataTypes = {
[InstanceAttributeCodes.ConsumedConnectionPath]: DataType.EPATH(false),
[InstanceAttributeCodes.ProductionInhibitTime]: DataType.UINT,
[InstanceAttributeCodes.ConnectionTimeoutMultiplier]: DataType.USINT,
- [InstanceAttributeCodes.ConnectionBindingList]: DataType.STRUCT([DataType.SMEMBER(DataType.UINT, true), DataType.PLACEHOLDER], function (members) {
- if (members.length === 1) {
- return DataType.ARRAY(DataType.UINT, 0, members[0]);
+ [InstanceAttributeCodes.ConnectionBindingList]: DataType.TRANSFORM(
+ DataType.STRUCT([
+ DataType.UINT,
+ DataType.PLACEHOLDER(length => DataType.ABBREV_ARRAY(DataType.UINT, length))
+ ], function (members, dt) {
+ if (members.length === 1) {
+ return dt.resolve(members[0]);
+ }
+ }), function(val) {
+ return val[1];
}
- })
+ )
};
|
Updated CIP Connection binding list instance attribute data type
|
diff --git a/tests/helpers.py b/tests/helpers.py
index <HASH>..<HASH> 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -1,10 +1,4 @@
-from nose import SkipTest
-from nose.tools import assert_raises
from flask.app import Flask
-try:
- from flask import __version__ as FLASK_VERSION
-except ImportError:
- FLASK_VERSION = '0.6'
from webassets.test import TempEnvironmentHelper as BaseTempEnvironmentHelper
from flask.ext.assets import Environment
@@ -24,13 +18,6 @@ __all__ = ('TempEnvironmentHelper', 'Module', 'Blueprint')
class TempEnvironmentHelper(BaseTempEnvironmentHelper):
def _create_environment(self, **kwargs):
- if FLASK_VERSION < '0.7':
- # Older Flask versions do not support the
- # static_folder argument, which we need to use
- # a temporary folder for static files, without
- # having to do sys.path hacking.
- raise SkipTest()
-
if not hasattr(self, 'app'):
self.app = Flask(__name__, static_folder=self.tempdir, **kwargs)
self.env = Environment(self.app)
|
Don't skip test when Flask <I>
Just don't skip test, since Flask-Assets requires at least Flask <I>.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -866,8 +866,8 @@ function flameGraph (opts) {
}
chart.getNodeRect = id => {
- // returns the node position and size on canvas, or false.
- return typeof (id) === 'number' && getNodeRect(id)
+ // returns the node position and size on canvas, or null.
+ return typeof (id) === 'number' ? getNodeRect(id) : null
}
chart.on = dispatch.on.bind(dispatch)
|
fixing the return value when no node is found
|
diff --git a/lib/accesslib.php b/lib/accesslib.php
index <HASH>..<HASH> 100755
--- a/lib/accesslib.php
+++ b/lib/accesslib.php
@@ -3023,7 +3023,7 @@ function get_enrolled_sql($context, $withcapability = '', $groupid = 0, $onlyact
$ctxids = implode(',', $contextids);
$roleids = implode(',', array_keys($prohibited));
$joins[] = "LEFT JOIN {role_assignments} {$prefix}ra4 ON ({$prefix}ra4.userid = {$prefix}u.id AND {$prefix}ra4.roleid IN ($roleids) AND {$prefix}ra4.contextid IN ($ctxids))";
- $wheres[] = "{$prefix}ra4 IS NULL";
+ $wheres[] = "{$prefix}ra4.id IS NULL";
}
if ($groupid) {
|
lib MDL-<I> Added missing field in get_enrolled_sql causing errors when capability had prohibited roles
|
diff --git a/src/Concerns/InteractsWithElements.php b/src/Concerns/InteractsWithElements.php
index <HASH>..<HASH> 100644
--- a/src/Concerns/InteractsWithElements.php
+++ b/src/Concerns/InteractsWithElements.php
@@ -187,6 +187,11 @@ trait InteractsWithElements
if (is_null($value)) {
$options[array_rand($options)]->click();
} else {
+
+ if (is_bool($value)) {
+ $value = $value ? '1' : '0';
+ }
+
foreach ($options as $option) {
if ((string) $option->getAttribute('value') === (string) $value) {
$option->click();
|
Update InteractsWithElements.php
cast boolean value to their appropriate string integer value.
|
diff --git a/Parsedown.php b/Parsedown.php
index <HASH>..<HASH> 100755
--- a/Parsedown.php
+++ b/Parsedown.php
@@ -90,7 +90,6 @@ class Parsedown
'<' => array('Markup'),
'=' => array('Setext'),
'>' => array('Quote'),
- '[' => array('Reference'),
'_' => array('Rule'),
'`' => array('FencedCode'),
'|' => array('Table'),
|
"reference" is a definition
|
diff --git a/cfs/main.go b/cfs/main.go
index <HASH>..<HASH> 100644
--- a/cfs/main.go
+++ b/cfs/main.go
@@ -73,6 +73,7 @@ func (NullWriter) Write([]byte) (int, error) { return 0, nil }
func main() {
+ fusermountPath()
flag.Usage = printUsage
flag.Parse()
clargs := getArgs(flag.Args())
@@ -178,6 +179,16 @@ func getArgs(args []string) map[string]string {
return clargs
}
+func fusermountPath() {
+ // Grab the current path
+ currentPath := os.Getenv("PATH")
+ if len(currentPath) == 0 {
+ // using mount seem to not have a path
+ // fusermount is in /bin
+ os.Setenv("PATH", "/bin")
+ }
+}
+
// printUsage will display usage
func printUsage() {
fmt.Println("Usage:")
|
Running with mount command has no environment PATH
The environment PATH variable has to contain the path to
/bin/fusermount
|
diff --git a/discovery-model/src/main/java/com/ticketmaster/discovery/model/Page.java b/discovery-model/src/main/java/com/ticketmaster/discovery/model/Page.java
index <HASH>..<HASH> 100644
--- a/discovery-model/src/main/java/com/ticketmaster/discovery/model/Page.java
+++ b/discovery-model/src/main/java/com/ticketmaster/discovery/model/Page.java
@@ -51,7 +51,7 @@ public class Page<T> {
private Boolean templated;
public String getRelativeHref() {
- if (templated) {
+ if (templated != null && templated) {
return href.replaceAll(TEMPLATE_PATTERN, "");
} else {
return href;
|
fix NPE in case when none templated links appears in response JSON
|
diff --git a/fints/client.py b/fints/client.py
index <HASH>..<HASH> 100644
--- a/fints/client.py
+++ b/fints/client.py
@@ -498,12 +498,12 @@ class FinTS3Client:
)
logger.info('Fetching done.')
- statement = []
- for seg in responses:
- # Note: MT940 messages are encoded in the S.W.I.F.T character set,
- # which is a subset of ISO 8859. There are no character in it that
- # differ between ISO 8859 variants, so we'll arbitrarily chose 8859-1.
- statement += mt940_to_array(seg.statement_booked.decode('iso-8859-1'))
+ # Note 1: Some banks send the HIKAZ data in arbitrary splits.
+ # So better concatenate them before MT940 parsing.
+ # Note 2: MT940 messages are encoded in the S.W.I.F.T character set,
+ # which is a subset of ISO 8859. There are no character in it that
+ # differ between ISO 8859 variants, so we'll arbitrarily chose 8859-1.
+ statement = mt940_to_array(''.join([seg.statement_booked.decode('iso-8859-1') for seg in responses]))
logger.debug('Statement: {}'.format(statement))
|
Concatenate HIKAZ data before MT<I> parsing.
Some banks (especially Sparkasse) send HIKAZ data split over multiple segments, which led to MT<I> parsing errors.
The patch changes the way the segments are parsed. Fixes #<I> .
|
diff --git a/lib/stripe_event.rb b/lib/stripe_event.rb
index <HASH>..<HASH> 100644
--- a/lib/stripe_event.rb
+++ b/lib/stripe_event.rb
@@ -52,7 +52,6 @@ module StripeEvent
'plan.updated',
'plan.deleted',
'coupon.created',
- 'coupon.updated',
'coupon.deleted',
'transfer.created',
'transfer.updated',
|
Remove old event type
coupon.updated event no longer exists
|
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -267,3 +267,10 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
+
+
+def setup(app):
+ from sphinx.util.texescape import tex_replacements
+ tex_replacements.append(
+ (u'\u2212', u'-'),
+ )
|
Re-add workaround for rendering of Unicode minus sign in PDF output.
|
diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/Record.php
+++ b/lib/Doctrine/Record.php
@@ -1513,15 +1513,14 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
{
static $methods = array();
if ( isset( $methods[$method])) {
- $methodArray = $methods[$method];
- $template = $methodArray["template"];
+ $template = $methods[$method];
$template->setInvoker($this);
- return call_user_func_array( array( $template, $method ), $methodArray["args"]);
+ return call_user_func_array( array($template, $method ), $args);
}
foreach ($this->_table->getTemplates() as $template) {
if (method_exists($template, $method)) {
$template->setInvoker($this);
- $methods[$method] = array("template" => $template, "args" => $args);
+ $methods[$method] = $template;
return call_user_func_array(array($template, $method), $args);
}
|
remove caching of args. it is just plain wrong
|
diff --git a/equal/main.go b/equal/main.go
index <HASH>..<HASH> 100644
--- a/equal/main.go
+++ b/equal/main.go
@@ -24,7 +24,7 @@ func main() {
if equal {
fmt.Println("equal: files match")
- os.Exit(0)
+ return // cleaner than os.Exit(0)
}
fmt.Println("equal: files differ")
|
return from main is cleaner than os.Exit(0).
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.