diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/includes/common/list-table-base.php b/includes/common/list-table-base.php
index <HASH>..<HASH> 100644
--- a/includes/common/list-table-base.php
+++ b/includes/common/list-table-base.php
@@ -162,6 +162,15 @@ class WP_Event_Calendar_List_Table extends WP_List_Table {
protected $item_end = '';
/**
+ * Number of days item is for
+ *
+ * @since 0.1.5
+ *
+ * @var bool
+ */
+ protected $item_days = '';
+
+ /**
* The main constructor method
*/
public function __construct( $args = array() ) {
@@ -595,6 +604,7 @@ class WP_Event_Calendar_List_Table extends WP_List_Table {
$this->item_all_day = (bool) get_post_meta( $post->ID, 'wp_event_calendar_all_day', true );
$this->item_start = get_post_meta( $post->ID, 'wp_event_calendar_date_time', true );
$this->item_end = get_post_meta( $post->ID, 'wp_event_calendar_end_date_time', true );
+ $this->item_days = intval( ( $this->item_end - $this->item_start ) / DAY_IN_SECONDS );
// Format start
if ( ! empty( $this->item_start ) ) {
|
Add support for item_days & multi-day row.
|
diff --git a/authentise_services/model.py b/authentise_services/model.py
index <HASH>..<HASH> 100644
--- a/authentise_services/model.py
+++ b/authentise_services/model.py
@@ -18,7 +18,7 @@ class Model(object):
if path:
self.upload_model(path)
elif model_uri:
- self.get_model_status()
+ self._get_model_status()
else:
self.name = ""
self.model_uri = ""
|
fix a call to an old method
|
diff --git a/cluster/manager.go b/cluster/manager.go
index <HASH>..<HASH> 100644
--- a/cluster/manager.go
+++ b/cluster/manager.go
@@ -392,8 +392,8 @@ func (c *ClusterManager) initNodeInCluster(
}
if nodeInitialized {
- dlog.Errorf(ErrNodeDecommissioned.Error())
- return ErrNodeDecommissioned
+ dlog.Errorf(ErrInitNodeNotFound.Error())
+ return ErrInitNodeNotFound
}
// Alert all listeners that we are a new node and we are initializing.
|
If node is initialized already, return appropriate error.
|
diff --git a/lib/xpi.js b/lib/xpi.js
index <HASH>..<HASH> 100644
--- a/lib/xpi.js
+++ b/lib/xpi.js
@@ -22,7 +22,6 @@ function xpi (manifest, options) {
var cwd = process.cwd();
var xpiName = (manifest.name || "jetpack") + ".xpi";
var xpiPath = join(cwd, xpiName);
- var buildOptions = createBuildOptions(options);
return doFinalZip(cwd, xpiPath);
}
|
Remove extra createBuildOptions for now
|
diff --git a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupService.java b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupService.java
index <HASH>..<HASH> 100644
--- a/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupService.java
+++ b/blueflood-core/src/main/java/com/rackspacecloud/blueflood/service/RollupService.java
@@ -131,7 +131,7 @@ public class RollupService implements Runnable, RollupServiceMBean {
// NOTE: higher locatorFetchConcurrency means that the queue used in rollupReadExecutors needs to be correspondingly
// higher.
Configuration config = Configuration.getInstance();
- rollupDelayMillis = config.getLongProperty("rollupDelayMillis");
+ rollupDelayMillis = config.getLongProperty("ROLLUP_DELAY_MILLIS");
final int locatorFetchConcurrency = config.getIntegerProperty(CoreConfig.MAX_LOCATOR_FETCH_THREADS);
locatorFetchExecutors = new InstrumentedThreadPoolExecutor(
"LocatorFetchThreadPool",
|
fix refactor typo in property name.
|
diff --git a/blockstack/lib/nameset/virtualchain_hooks.py b/blockstack/lib/nameset/virtualchain_hooks.py
index <HASH>..<HASH> 100644
--- a/blockstack/lib/nameset/virtualchain_hooks.py
+++ b/blockstack/lib/nameset/virtualchain_hooks.py
@@ -175,6 +175,7 @@ def get_db_state( disposition=DISPOSITION_RO ):
log.error("FATAL: no such file or directory: %s" % lastblock_filename )
os.abort()
+ # verify that it is well-formed, if it exists
elif os.path.exists( lastblock_filename ):
try:
with open(lastblock_filename, "r") as f:
|
justify why we check lastblock when we open the db
|
diff --git a/cellbase-mongodb/src/main/java/org/opencb/cellbase/mongodb/loader/MongoDBCellBaseLoader.java b/cellbase-mongodb/src/main/java/org/opencb/cellbase/mongodb/loader/MongoDBCellBaseLoader.java
index <HASH>..<HASH> 100644
--- a/cellbase-mongodb/src/main/java/org/opencb/cellbase/mongodb/loader/MongoDBCellBaseLoader.java
+++ b/cellbase-mongodb/src/main/java/org/opencb/cellbase/mongodb/loader/MongoDBCellBaseLoader.java
@@ -262,6 +262,8 @@ public class MongoDBCellBaseLoader extends CellBaseLoader {
protected boolean runCreateIndexProcess(Path indexFilePath) throws IOException, InterruptedException {
List<String> args = new ArrayList<>();
args.add("mongo");
+ args.add("--host");
+ args.add(cellBaseConfiguration.getDatabase().getHost());
if(cellBaseConfiguration.getDatabase().getUser() != null && !cellBaseConfiguration.getDatabase().getUser().equals("")) {
args.addAll(Arrays.asList(
"-u", cellBaseConfiguration.getDatabase().getUser(),
|
Load now reads database 'host' from configuration file
|
diff --git a/import_export/widgets.py b/import_export/widgets.py
index <HASH>..<HASH> 100644
--- a/import_export/widgets.py
+++ b/import_export/widgets.py
@@ -295,7 +295,7 @@ class JSONWidget(Widget):
class ForeignKeyWidget(Widget):
"""
Widget for a ``ForeignKey`` field which looks up a related model using
- "natural keys" in both export an import.
+ "natural keys" in both export and import.
The lookup field defaults to using the primary key (``pk``) as lookup
criterion but can be customised to use any field on the related model.
|
Typo fix in widgets.py
|
diff --git a/test/test_object_dispatch.py b/test/test_object_dispatch.py
index <HASH>..<HASH> 100644
--- a/test/test_object_dispatch.py
+++ b/test/test_object_dispatch.py
@@ -2,11 +2,31 @@
from __future__ import unicode_literals
-from sample import function # , Simple, CallableShallow, CallableDeep, CallableMixed
+from collections import deque
from web.dispatch.object import ObjectDispatch
+from sample import function # , Simple, CallableShallow, CallableDeep, CallableMixed
+
+
+# We pre-create these for the sake of convienence.
+# In ordinary usage frameworks should try to avoid excessive reinstantiation where possible.
+dispatch = ObjectDispatch()
+promiscuous = ObjectDispatch(protect=False)
+
+
+def path(path):
+ return deque(path.split('/')[1:])
+
+
-def test_foo():
- ObjectDispatch
- function
+class TestFunctionDispatch(object):
+ def test_root_path_resolves_to_function(self):
+ result = list(dispatch(None, function, path('/')))
+ assert len(result) == 1
+ assert result == [(None, function, True)]
+
+ def test_deep_path_resolves_to_function(self):
+ result = list(dispatch(None, function, path('/foo/bar/baz')))
+ assert len(result) == 1
+ assert result == [(None, function, True)]
|
Stub tests that actually test things.
|
diff --git a/src/main/java/eu/hansolo/tilesfx/skins/StockTileSkin.java b/src/main/java/eu/hansolo/tilesfx/skins/StockTileSkin.java
index <HASH>..<HASH> 100644
--- a/src/main/java/eu/hansolo/tilesfx/skins/StockTileSkin.java
+++ b/src/main/java/eu/hansolo/tilesfx/skins/StockTileSkin.java
@@ -417,10 +417,10 @@ public class StockTileSkin extends TileSkin {
handleCurrentValue(tile.getValue());
if (tile.getAveragingPeriod() < 500) {
- sparkLine.setStrokeWidth(size * 0.001);
+ sparkLine.setStrokeWidth(size * 0.005);
dot.setRadius(size * 0.014);
} else {
- sparkLine.setStrokeWidth(size * 0.005);
+ sparkLine.setStrokeWidth(size * 0.001);
dot.setRadius(size * 0.007);
}
|
Fixed minor problem related to linewidth in StockTileSkin
|
diff --git a/config/routes.rb b/config/routes.rb
index <HASH>..<HASH> 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,7 +1,10 @@
ClientManager::Engine.routes.draw do
root to: 'users#index'
get 'login', to: 'sessions#login'
+ get 'logout', to: 'sessions#logout'
post 'login_attempt', to: 'sessions#login_attempt'
+ get 'change_password', to: 'passwords#change'
+ post 'change_password_attempt', to: 'passwords#change_password_attempt'
get 'clients', to: 'clients#index'
resources :users, only: [:index, :new, :create]
end
|
Add routes for password change and logging out
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -10,7 +10,7 @@ sentence_end = readme_contents.find('.', parastart)
setup(
name='cluster',
- version='1.2.2',
+ version=open('cluster/version.txt').read().strip(),
author='Michel Albert',
author_email='michel@albert.lu',
url='https://github.com/exhuma/python-cluster',
|
Aligning version in setup.py with package version.
|
diff --git a/lib/stupidedi/config.rb b/lib/stupidedi/config.rb
index <HASH>..<HASH> 100644
--- a/lib/stupidedi/config.rb
+++ b/lib/stupidedi/config.rb
@@ -109,6 +109,7 @@ module Stupidedi
x.register("005010X220", "BE", "834") { Stupidedi::Guides::FiftyTen::X220::BE834 }
x.register("005010X221", "HP", "835") { Stupidedi::Guides::FiftyTen::X221::HP835 }
x.register("005010X222", "HC", "837") { Stupidedi::Guides::FiftyTen::X222::HC837P }
+ x.register("005010X223", "HC", "837") { Stupidedi::Guides::FiftyTen::X223::HC837I }
x.register("005010X231", "FA", "999") { Stupidedi::Guides::FiftyTen::X231::FA999 }
x.register("005010X220A1", "BE", "834") { Stupidedi::Guides::FiftyTen::X220A1::BE834 }
x.register("005010X221A1", "HP", "835") { Stupidedi::Guides::FiftyTen::X221A1::HP835 }
|
Add HC<I>I reference to Configuration.hippa constructor
|
diff --git a/psamm/commands/tmfa.py b/psamm/commands/tmfa.py
index <HASH>..<HASH> 100644
--- a/psamm/commands/tmfa.py
+++ b/psamm/commands/tmfa.py
@@ -336,9 +336,7 @@ def make_tmfa_problem(mm_irreversible, solver):
solver: linear programming library to use.
"""
prob = solver.create_problem()
- prob.cplex.parameters.threads.set(1)
prob.integrality_tolerance.value = 0
- prob.cplex.parameters.emphasis.numerical.value = 1
v = prob.namespace(name='flux')
zi = prob.namespace(name='zi')
|
Removed obsolete solver settings in tmfa.py
|
diff --git a/collector/suite_test.go b/collector/suite_test.go
index <HASH>..<HASH> 100644
--- a/collector/suite_test.go
+++ b/collector/suite_test.go
@@ -43,4 +43,5 @@ func (s *S) TearDownSuite(c *C) {
func (s *S) TearDownTest(c *C) {
_, err := db.Session.Apps().RemoveAll(nil)
c.Assert(err, IsNil)
+ s.provisioner.Reset()
}
|
collector/tests: Reset FakeProvisioner on TearDownTest
|
diff --git a/src/com/opencms/workplace/CmsXmlLanguageFileContent.java b/src/com/opencms/workplace/CmsXmlLanguageFileContent.java
index <HASH>..<HASH> 100644
--- a/src/com/opencms/workplace/CmsXmlLanguageFileContent.java
+++ b/src/com/opencms/workplace/CmsXmlLanguageFileContent.java
@@ -159,10 +159,9 @@ public class CmsXmlLanguageFileContent extends A_CmsXmlContent {
if(! file.getName().toLowerCase().endsWith(".txt") && file.getState() != I_CmsConstants.C_STATE_DELETED) {
try {
init(cms, file.getAbsolutePath());
- readIncludeFile(file.getAbsolutePath());
} catch(Exception exc) {
if(C_LOGGING && A_OpenCms.isLogging(C_OPENCMS_CRITICAL) ) {
- A_OpenCms.log(C_OPENCMS_CRITICAL, "[" + this.getClass().getName() + ".mergeLanguageFiles/3] Error merging language file: " + file.getAbsolutePath() + ", " + exc.toString() );
+ A_OpenCms.log(C_OPENCMS_CRITICAL, "[" + this.getClass().getName() + ".mergeLanguageFiles/3] Error merging language file: " + file.getAbsolutePath());
}
}
}
|
Removed unnecessary call of readIncludeFile that caused InstantiationExceptions.
|
diff --git a/sixpack/sixpack-web.py b/sixpack/sixpack-web.py
index <HASH>..<HASH> 100644
--- a/sixpack/sixpack-web.py
+++ b/sixpack/sixpack-web.py
@@ -1,7 +1,7 @@
from flask import Flask, render_template, abort, request, url_for, redirect
from flask.ext.seasurf import SeaSurf
-import db
+from db import REDIS
from models import Experiment
from models import Alternative
@@ -12,7 +12,7 @@ csrf = SeaSurf(app)
# List of experiments
@app.route("/")
def hello():
- experiments = Experiment.all(db.REDIS)
+ experiments = Experiment.all(REDIS)
return render_template('dashboard.html', experiments=experiments)
@@ -87,7 +87,7 @@ def favicon():
def find_or_404(experiment_name):
try:
- return Experiment.find(experiment_name, db.REDIS)
+ return Experiment.find(experiment_name, REDIS)
except:
abort(404)
|
only need REDIS from db
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,10 +1,10 @@
+# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='hepdata-converter',
version='0.1',
- install_requires=['pyyaml'],
- tests_requires=[],
+ requires=['pyyaml'],
packages=['hepdata_converter', 'hepdata_converter.parsers', 'hepdata_converter.writers', 'hepdata_converter.testsuite'],
url='',
license='',
|
Fixed setup.py, now works correctly
|
diff --git a/DrdPlus/Tests/RollsOn/QualityAndSuccess/SimpleRollOnSuccessTest.php b/DrdPlus/Tests/RollsOn/QualityAndSuccess/SimpleRollOnSuccessTest.php
index <HASH>..<HASH> 100644
--- a/DrdPlus/Tests/RollsOn/QualityAndSuccess/SimpleRollOnSuccessTest.php
+++ b/DrdPlus/Tests/RollsOn/QualityAndSuccess/SimpleRollOnSuccessTest.php
@@ -57,7 +57,7 @@ class SimpleRollOnSuccessTest extends TestWithMockery
* @param $value
* @return \Mockery\MockInterface|Roll
*/
- private function createRoll($value)
+ protected function createRoll($value): Roll
{
$roll = $this->mockery(Roll::class);
$roll->shouldReceive('getValue')
|
An inner test method can be accessed by its descendants
|
diff --git a/troposphere/cloudwatch.py b/troposphere/cloudwatch.py
index <HASH>..<HASH> 100644
--- a/troposphere/cloudwatch.py
+++ b/troposphere/cloudwatch.py
@@ -108,3 +108,29 @@ class Dashboard(AWSObject):
if name in self.properties:
dashboard_body = self.properties.get(name)
self.properties[name] = json_checker(dashboard_body)
+
+
+class Range(AWSProperty):
+ props = {
+ 'EndTime': (basestring, True),
+ 'StartTime': (basestring, True),
+ }
+
+
+class Configuration(AWSProperty):
+ props = {
+ 'ExcludedTimeRanges': ([Range], False),
+ 'MetricTimeZone': (basestring, False),
+ }
+
+
+class AnomalyDetector(AWSObject):
+ resource_type = "AWS::CloudWatch::AnomalyDetector"
+
+ props = {
+ 'Configuration': (Configuration, False),
+ 'Dimensions': ([MetricDimension], False),
+ 'MetricName': (basestring, True),
+ 'Namespace': (basestring, True),
+ 'Stat': (basestring, True)
+ }
|
Add Cloudwatch AnomalyDetector resource (#<I>)
|
diff --git a/fluent_blogs/base_models.py b/fluent_blogs/base_models.py
index <HASH>..<HASH> 100644
--- a/fluent_blogs/base_models.py
+++ b/fluent_blogs/base_models.py
@@ -11,7 +11,7 @@ from fluent_blogs.urlresolvers import blog_reverse
from fluent_blogs.models.managers import EntryManager, TranslatableEntryManager
from fluent_blogs.utils.compat import get_user_model_name
from fluent_blogs import appsettings
-from fluent_contents.models import PlaceholderField
+from fluent_contents.models import PlaceholderField, ContentItemRelation
__all__ = (
@@ -200,6 +200,9 @@ class ContentsEntryMixin(models.Model):
"""
contents = PlaceholderField("blog_contents")
+ # Adding the ContentItemRelation makes sure the admin can find all deleted objects too.
+ contentitem_set = ContentItemRelation()
+
class Meta:
abstract = True
|
Added the ContentItemRelation() to the blog entry.
This makes sure all deleted ContentItem objects are also visible in the admin page.
|
diff --git a/src/style_manager/index.js b/src/style_manager/index.js
index <HASH>..<HASH> 100644
--- a/src/style_manager/index.js
+++ b/src/style_manager/index.js
@@ -281,8 +281,6 @@ module.exports = () => {
if (!rule) {
rule = cssC.add(valid, state, deviceW);
- rule.setStyle(model.getStyle());
- model.setStyle({});
}
} else if (config.avoidInlineStyle) {
rule = cssC.getIdRule(id, opts);
|
Avoid moving styles from Component to Rules. Fixes #<I>
|
diff --git a/src/Shell/Task/TemplateTask.php b/src/Shell/Task/TemplateTask.php
index <HASH>..<HASH> 100644
--- a/src/Shell/Task/TemplateTask.php
+++ b/src/Shell/Task/TemplateTask.php
@@ -47,9 +47,7 @@ class TemplateTask extends Shell {
/**
* Get view instance
*
- * @param string $viewClass View class name or null to use $viewClass
* @return \Cake\View\View
- * @throws \Cake\View\Exception\MissingViewException If view class was not found.
*/
public function getView() {
if ($this->View) {
|
remove unused params
the exception isn't thrown either by this method
|
diff --git a/laravel/config/filesystems.php b/laravel/config/filesystems.php
index <HASH>..<HASH> 100644
--- a/laravel/config/filesystems.php
+++ b/laravel/config/filesystems.php
@@ -61,7 +61,7 @@ return [
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
- 'url' => env('AWS_URL'),
+ 'endpoint' => env('AWS_URL'),
],
],
|
Update endpoint for aws configuration.
|
diff --git a/lib/emcee/document.rb b/lib/emcee/document.rb
index <HASH>..<HASH> 100644
--- a/lib/emcee/document.rb
+++ b/lib/emcee/document.rb
@@ -16,8 +16,8 @@ module Emcee
end
def to_s
- output = @doc.at("body").children
- output.to_s.lstrip
+ body = @doc.at("body").children
+ body.to_s.lstrip
end
def html_imports
|
Rename variable in `to_s` method of Document
|
diff --git a/lib/pdk/util.rb b/lib/pdk/util.rb
index <HASH>..<HASH> 100644
--- a/lib/pdk/util.rb
+++ b/lib/pdk/util.rb
@@ -32,7 +32,9 @@ module PDK
#
# @return [String] The temporary directory path.
def make_tmpdir_name(base)
- Dir::Tmpname.make_tmpname(File.join(Dir.tmpdir, base), nil)
+ t = Time.now.strftime('%Y%m%d')
+ name = "#{base}#{t}-#{Process.pid}-#{rand(0x100000000).to_s(36)}"
+ File.join(Dir.tmpdir, name)
end
module_function :make_tmpdir_name
|
(PDK-<I>) Make PDK compatible with Ruby <I>
|
diff --git a/lib/rb-kqueue/native/flags.rb b/lib/rb-kqueue/native/flags.rb
index <HASH>..<HASH> 100644
--- a/lib/rb-kqueue/native/flags.rb
+++ b/lib/rb-kqueue/native/flags.rb
@@ -48,6 +48,13 @@ module KQueue
NOTE_RENAME = 0x00000020 # Vnode was renamed
NOTE_REVOKE = 0x00000040 # Vnode access was revoked
+ # For `EVFILT_PROC`
+ NOTE_EXIT = 0x80000000 # Process exited
+ NOTE_FORK = 0x40000000 # Process forked
+ NOTE_EXEC = 0x20000000 # Process exec'd
+ NOTE_REAP = 0x10000000 # Process reaped
+ NOTE_SIGNAL = 0x08000000 # Received signal
+
# Converts a list of flags to the bitmask that the C API expects.
#
|
Add flags for process-watching.
|
diff --git a/runner/steps.js b/runner/steps.js
index <HASH>..<HASH> 100644
--- a/runner/steps.js
+++ b/runner/steps.js
@@ -29,9 +29,9 @@ var browsers = require('./browsers');
// We prefer serving local assets over bower assets.
var PACKAGE_ROOT = path.resolve(__dirname, '..');
-var SERVE_STATIC = {
- '/web-component-tester/browser.js': path.join(PACKAGE_ROOT, 'browser.js'),
- '/web-component-tester/environment.js': path.join(PACKAGE_ROOT, 'environment.js'),
+var SERVE_STATIC = { // Keys are regexps.
+ '^.*\/web-component-tester\/browser\.js$': path.join(PACKAGE_ROOT, 'browser.js'),
+ '^.*\/web-component-tester\/environment\.js$': path.join(PACKAGE_ROOT, 'environment.js'),
};
// Steps
@@ -119,7 +119,7 @@ function startStaticServer(options, emitter, done) {
});
_.each(SERVE_STATIC, function(file, url) {
- app.get(url, function(request, response) {
+ app.get(new RegExp(url), function(request, response) {
send(request, file).pipe(response);
});
});
|
Match anything that looks like browser.js or environment.js
|
diff --git a/cmd/server/main.go b/cmd/server/main.go
index <HASH>..<HASH> 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -149,6 +149,13 @@ func main() {
return err
}
+ cf := &logrus.TextFormatter{
+ TimestampFormat: "2006-01-02 15:04:05.000000000Z07:00",
+ FullTimestamp: true,
+ }
+
+ logrus.SetFormatter(cf)
+
if c.GlobalBool("debug") {
logrus.SetLevel(logrus.DebugLevel)
}
|
Add timestamps to logs
|
diff --git a/lib/higml/parser.rb b/lib/higml/parser.rb
index <HASH>..<HASH> 100644
--- a/lib/higml/parser.rb
+++ b/lib/higml/parser.rb
@@ -83,9 +83,9 @@ module Higml
def type
case @stripped_source[0]
- when VALUE_INDICATOR: :value
- when IMPORT_INDICATOR: :import
- when COMMENT_INDICATOR: :comment
+ when VALUE_INDICATOR then :value
+ when IMPORT_INDICATOR then :import
+ when COMMENT_INDICATOR then :comment
else
:selector
end
|
Syntax changed to support <I>
|
diff --git a/openquake/calculators/ucerf_event_based.py b/openquake/calculators/ucerf_event_based.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/ucerf_event_based.py
+++ b/openquake/calculators/ucerf_event_based.py
@@ -336,7 +336,7 @@ def compute_losses(ssm, src_filter, param, riskmodel, monitor):
res = List()
rlzs_assoc = ssm.info.get_rlzs_assoc()
rlzs_by_gsim = rlzs_assoc.get_rlzs_by_gsim(DEFAULT_TRT)
- hazard = compute_gmfs(grp, src_filter, rlzs_by_gsim, param, monitor)
+ hazard = compute_hazard(grp, src_filter, rlzs_by_gsim, param, monitor)
[(grp_id, ebruptures)] = hazard['ruptures'].items()
samples = ssm.info.get_samples_by_grp()
|
Renaming [skip hazardlib]
|
diff --git a/zinnia/tests.py b/zinnia/tests.py
index <HASH>..<HASH> 100644
--- a/zinnia/tests.py
+++ b/zinnia/tests.py
@@ -427,9 +427,12 @@ class ZinniaViewsTestCase(TestCase):
response = self.client.get('/2010/01/01/my-test-entry/')
self.assertEquals(response.status_code, 404)
+ entry.template = 'zinnia/_entry_detail.html'
+ entry.save()
entry.sites.add(Site.objects.get_current())
response = self.client.get('/2010/01/01/my-test-entry/')
self.assertEquals(response.status_code, 200)
+ self.assertTemplateUsed(response, 'zinnia/_entry_detail.html')
def test_zinnia_entry_channel(self):
self.check_publishing_context('/channel-test/', 2, 3)
|
testing entry template overriding in entry_detail view
|
diff --git a/go/coredns/plugin/pfdns/pfdns.go b/go/coredns/plugin/pfdns/pfdns.go
index <HASH>..<HASH> 100644
--- a/go/coredns/plugin/pfdns/pfdns.go
+++ b/go/coredns/plugin/pfdns/pfdns.go
@@ -130,6 +130,10 @@ func (pf *pfdns) RefreshPfconfig(ctx context.Context) {
// ServeDNS implements the middleware.Handler interface.
func (pf *pfdns) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
+ id, _ := GlobalTransactionLock.Lock()
+
+ defer GlobalTransactionLock.Unlock(id)
+
pf.RefreshPfconfig(ctx)
state := request.Request{W: w, Req: r}
|
read lock in pfdns
|
diff --git a/osmdroid-android/src/main/java/org/osmdroid/views/overlay/compass/CompassOverlay.java b/osmdroid-android/src/main/java/org/osmdroid/views/overlay/compass/CompassOverlay.java
index <HASH>..<HASH> 100644
--- a/osmdroid-android/src/main/java/org/osmdroid/views/overlay/compass/CompassOverlay.java
+++ b/osmdroid-android/src/main/java/org/osmdroid/views/overlay/compass/CompassOverlay.java
@@ -196,9 +196,6 @@ public class CompassOverlay extends SafeDrawOverlay implements IOverlayMenuProvi
return;
}
- mAzimuth = 100;
- mIsCompassEnabled = true;
-
if (isCompassEnabled() && !Float.isNaN(mAzimuth)) {
drawCompass(canvas, mAzimuth + getDisplayOrientation(), mapView.getProjection().getScreenRect());
}
|
Removed some debug lines that I accidentally left in.
|
diff --git a/openquake/commands/dbserver.py b/openquake/commands/dbserver.py
index <HASH>..<HASH> 100644
--- a/openquake/commands/dbserver.py
+++ b/openquake/commands/dbserver.py
@@ -49,10 +49,12 @@ def dbserver(cmd, dbhostport=None,
else:
print('dbserver already running')
elif cmd == 'restart':
- if status == 'running':
- pid = logs.dbcmd('getpid')
- os.kill(pid, signal.SIGINT)
- dbs.run_server(dbpath, dbhostport, loglevel, foreground)
+ print('please use oq dbserver start/stop')
+ # FIXME restart is currently broken
+ # if status == 'running':
+ # pid = logs.dbcmd('getpid')
+ # os.kill(pid, signal.SIGINT)
+ # dbs.run_server(dbpath, dbhostport, loglevel, foreground)
dbserver.arg('cmd', 'dbserver command',
|
Mark oq dbserver restart as broken
Former-commit-id: <I>fbd<I>c<I>da<I>e<I>f<I>ce<I>bbec5b8
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -72,7 +72,7 @@ master_doc = 'index'
# General information about the project.
project = 'aiohttp_session'
-copyright = '2015, Andrew Svetlov'
+copyright = '2015,2016 Andrew Svetlov'
author = 'Andrew Svetlov'
# The version info for the project you're documenting, acts as replacement for
|
Update conf.py
<I> year
|
diff --git a/vyper/parser/context.py b/vyper/parser/context.py
index <HASH>..<HASH> 100644
--- a/vyper/parser/context.py
+++ b/vyper/parser/context.py
@@ -103,12 +103,13 @@ class Context:
def make_blockscope(self, blockscope_id):
self.blockscopes.add(blockscope_id)
yield
+
# Remove all variables that have specific blockscope_id attached.
- self.vars = {
- name: var_record
- for name, var_record in self.vars.items()
- if blockscope_id not in var_record.blockscopes
- }
+ released = [(k, v) for k, v in self.vars.items() if blockscope_id in v.blockscopes]
+ for name, var in released:
+ self.memory_allocator.release_memory(var.pos, var.size * 32)
+ del self.vars[name]
+
# Remove block scopes
self.blockscopes.remove(blockscope_id)
|
feat: release memory upon exit of block scope
|
diff --git a/src/Foundation/Console/OptimizeCommand.php b/src/Foundation/Console/OptimizeCommand.php
index <HASH>..<HASH> 100644
--- a/src/Foundation/Console/OptimizeCommand.php
+++ b/src/Foundation/Console/OptimizeCommand.php
@@ -78,7 +78,7 @@ class OptimizeCommand extends Command
*/
protected function compileClasses()
{
- $outputPath = $this->framework['path.base'] .Ds .'Boot' .DS .'Compiled.php';
+ $outputPath = $this->framework['path.base'] .DS .'Boot' .DS .'Compiled.php';
//
$preloader = (new Factory)->create(['skip' => true]);
@@ -105,7 +105,7 @@ class OptimizeCommand extends Command
{
$app = $this->framework;
- $core = require __DIR__.DS .'Optimize'.DS.'config.php';
+ $core = require __DIR__.DS .'Optimize' .DS .'config.php';
return array_merge($core, $this->framework['config']['compile']);
}
|
Improve Nova\Console\OptimizeCommand
|
diff --git a/java-client/src/main/java/com/canoo/dolphin/client/impl/ClientContextImpl.java b/java-client/src/main/java/com/canoo/dolphin/client/impl/ClientContextImpl.java
index <HASH>..<HASH> 100644
--- a/java-client/src/main/java/com/canoo/dolphin/client/impl/ClientContextImpl.java
+++ b/java-client/src/main/java/com/canoo/dolphin/client/impl/ClientContextImpl.java
@@ -100,6 +100,7 @@ public class ClientContextImpl implements ClientContext {
if(destroyed) {
throw new IllegalStateException("The client is disconnected!");
}
+ clientDolphin.stopPushListening();
return invokeDolphinCommand(PlatformConstants.DISCONNECT_COMMAND_NAME).thenAccept(v -> destroyed = true);
}
|
Stop pushListening in disconnect()
|
diff --git a/treeherder/model/models.py b/treeherder/model/models.py
index <HASH>..<HASH> 100644
--- a/treeherder/model/models.py
+++ b/treeherder/model/models.py
@@ -448,7 +448,7 @@ class ExclusionProfile(models.Model):
return list1, list2
query = None
- for exclusion in self.exclusions.all().select_related("info"):
+ for exclusion in self.exclusions.all():
info = exclusion.info
option_collection_hashes = info['option_collection_hashes']
job_type_names, job_type_symbols = split_combo(info['job_types'])
|
Bug <I> - Error adding exclusion profile after update to Django <I>
We were calling select_related on a non-relational field. Only became
an issue with Django <I>.
|
diff --git a/tests/conftest.py b/tests/conftest.py
index <HASH>..<HASH> 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -37,11 +37,28 @@ from flask_celeryext import FlaskCeleryExt
from invenio_db import db as db_
from invenio_db import InvenioDB
from invenio_pidstore import InvenioPIDStore
+from sqlalchemy.ext.compiler import compiles
+from sqlalchemy.schema import DropConstraint, DropSequence, DropTable
from sqlalchemy_utils.functions import create_database, database_exists
from invenio_records import InvenioRecords
+@compiles(DropTable, 'postgresql')
+def _compile_drop_table(element, compiler, **kwargs):
+ return compiler.visit_drop_table(element) + ' CASCADE'
+
+
+@compiles(DropConstraint, 'postgresql')
+def _compile_drop_constraint(element, compiler, **kwargs):
+ return compiler.visit_drop_constraint(element) + ' CASCADE'
+
+
+@compiles(DropSequence, 'postgresql')
+def _compile_drop_sequence(element, compiler, **kwargs):
+ return compiler.visit_drop_sequence(element) + ' CASCADE'
+
+
@pytest.yield_fixture()
def app(request):
"""Flask application fixture."""
|
tests: cascading deletes on PostgreSQL
|
diff --git a/swarm-server/src/Server.js b/swarm-server/src/Server.js
index <HASH>..<HASH> 100644
--- a/swarm-server/src/Server.js
+++ b/swarm-server/src/Server.js
@@ -1,4 +1,5 @@
"use strict";
+var fs = require('fs');
var Replica = require('swarm-replica');
var sync = require('swarm-syncable');
var Host = sync.Host;
@@ -9,6 +10,7 @@ require('stream-url-ws');
// Host combo where the Host is mostly used for op log aggregation.
// TODO add REST API for state bundles (Replica->Host->REST API)
function Server (options) {
+ options.debug && console.log('swarm server options', options);
this.options = options;
if (!options.ssn_id) {
options.ssn_id = options.user_id || 'swarm';
@@ -20,7 +22,15 @@ function Server (options) {
options.listen = 'ws://localhost:8000';
}
- this.db = level(options.db_path || '.');
+ if (options.db) {
+ this.db = options.db;
+ } else {
+ var db_path = options.db_path || './swarm.db';
+ if (!fs.existsSync(db_path)) {
+ fs.mkdirSync(db_path);
+ }
+ this.db = level(db_path);
+ }
// BIG TODO: propagate ssn grant replica->host
// use exactly the same clock object!!!
|
chore(server): put db into a dir
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -79,6 +79,8 @@ MyVirtualMerchant.prototype.doPurchase = function (order, prospect, creditcard,
query.ssl_avs_address = prospect.billing.adress;
query.ssl_avs_zip = prospect.billing.zipcode;
query.ssl_city = prospect.billing.city;
+ query.ssl_zip = prospect.billing.zipcode;
+ query.ssl_state = prospect.billing.region;
query.ssl_country = prospect.billing.country;
}
}
|
More details for transactions (state, zip).
|
diff --git a/lib/discordrb/commands/command_bot.rb b/lib/discordrb/commands/command_bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/commands/command_bot.rb
+++ b/lib/discordrb/commands/command_bot.rb
@@ -150,7 +150,8 @@ module Discordrb::Commands
event.respond @attributes[:command_doesnt_exist_message].gsub('%command%', name.to_s) if @attributes[:command_doesnt_exist_message]
return
end
- if permission?(event.user, command.attributes[:permission_level], event.server)
+ if permission?(event.user, command.attributes[:permission_level], event.server) &&
+ required_permissions?(event.author, command.attributes[:required_permissions], event.channel)
event.command = command
result = command.call(event, arguments, chained)
stringify(result)
|
Check for required_permissions? in execute_command
|
diff --git a/lnd_test.go b/lnd_test.go
index <HASH>..<HASH> 100644
--- a/lnd_test.go
+++ b/lnd_test.go
@@ -1448,7 +1448,7 @@ func testChannelForceClosure(net *lntest.NetworkHarness, t *harnessTest) {
nodes := []*lntest.HarnessNode{net.Alice, carol}
err = lntest.WaitPredicate(func() bool {
return assertNumActiveHtlcs(nodes, numInvoices)
- }, time.Second*5)
+ }, time.Second*15)
if err != nil {
t.Fatalf("htlc mismatch: %v", err)
}
@@ -6089,7 +6089,7 @@ func testMultiHopHtlcLocalChainClaim(net *lntest.NetworkHarness, t *harnessTest)
}
return true
- }, time.Second*5)
+ }, time.Second*15)
if err != nil {
t.Fatalf(predErr.Error())
}
|
test: extend timeouts for WaitPredicate on new integration tests
|
diff --git a/app/controllers/errdo/application_controller.rb b/app/controllers/errdo/application_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/errdo/application_controller.rb
+++ b/app/controllers/errdo/application_controller.rb
@@ -1,7 +1,5 @@
module Errdo
class ApplicationController < ActionController::Base
- helper Errdo::Helpers::ViewsHelper
-
end
end
diff --git a/app/controllers/errdo/errors_controller.rb b/app/controllers/errdo/errors_controller.rb
index <HASH>..<HASH> 100644
--- a/app/controllers/errdo/errors_controller.rb
+++ b/app/controllers/errdo/errors_controller.rb
@@ -3,6 +3,9 @@ require "slim"
module Errdo
class ErrorsController < ApplicationController
+ include Errdo::Helpers::ViewsHelper
+ helper_method :user_show_string, :user_show_path
+
def index
@errors = Errdo::Error.order(last_occurred_at: :desc).page params[:page]
end
|
Fix issue (bug?) where view helper wouldn't show up in integration test (But would on the server)
|
diff --git a/tests/mustacheTest.php b/tests/mustacheTest.php
index <HASH>..<HASH> 100644
--- a/tests/mustacheTest.php
+++ b/tests/mustacheTest.php
@@ -9,6 +9,10 @@ class MustacheSpecTest extends PHPUnit_Framework_TestCase
*/
public function testSpecs($spec)
{
+ if (preg_match('/(lambdas|delimiters)\\.json/', $spec['file'])) {
+ $this->markTestIncomplete("Skip [{$spec['file']}.{$spec['name']}]#{$spec['no']} , lightncandy do not support this now.");
+ }
+
$php = LightnCandy::compile($spec['template'], Array(
'flags' => LightnCandy::FLAG_HANDLEBARSJS | LightnCandy::FLAG_ERROR_EXCEPTION,
'helpers' => array(
|
skip tests on lightncandy none supported features
|
diff --git a/workbench/clients/pe_indexer.py b/workbench/clients/pe_indexer.py
index <HASH>..<HASH> 100644
--- a/workbench/clients/pe_indexer.py
+++ b/workbench/clients/pe_indexer.py
@@ -64,6 +64,10 @@ def run():
print 'Probably using a Stub Indexer, if you want an ELS Indexer see the readme'
+import pytest
+#pylint: disable=no-member
+@pytest.mark.xfail
+#pylint: enable=no-member
def test():
"""Executes pe_strings_indexer test."""
run()
|
putting xfail on the indexer clients until we can figure out when travis ELS is now failing
|
diff --git a/src/filesystem/impls/appshell/AppshellFileSystem.js b/src/filesystem/impls/appshell/AppshellFileSystem.js
index <HASH>..<HASH> 100644
--- a/src/filesystem/impls/appshell/AppshellFileSystem.js
+++ b/src/filesystem/impls/appshell/AppshellFileSystem.js
@@ -233,13 +233,30 @@ define(function (require, exports, module) {
encoding = options.encoding || "utf8";
}
- appshell.fs.readFile(path, encoding, function (err, data) {
- if (err) {
- callback(_mapError(err), null);
+ // Execute the read and stat calls in parallel
+ var done = false, data, stat, err;
+
+ appshell.fs.readFile(path, encoding, function (_err, _data) {
+ if (_err) {
+ callback(_mapError(_err));
+ return;
+ }
+
+ if (done) {
+ callback(err, _data, stat);
} else {
- stat(path, function (err, stat) {
- callback(err, data, stat);
- });
+ done = true;
+ data = _data;
+ }
+ });
+
+ exports.stat(path, function (_err, _stat) {
+ if (done) {
+ callback(_err, data, _stat);
+ } else {
+ done = true;
+ stat = _stat;
+ err = _err;
}
});
}
|
Execute read and stat calls in parallel in AppshellFileSystem.readFile, resulting in a ~4-5% (><I>ms) speedup for Brackets-sized find-in-files queries
|
diff --git a/monolith/__init__.py b/monolith/__init__.py
index <HASH>..<HASH> 100644
--- a/monolith/__init__.py
+++ b/monolith/__init__.py
@@ -1,7 +1,7 @@
"""
monolith is an argparse based command line interface framework
"""
-VERSION = (0, 1, 0)
+VERSION = (0, 1, 1)
__version__ = '.'.join((str(each) for each in VERSION[:4]))
|
Bumped version to <I>
|
diff --git a/fermipy/castro.py b/fermipy/castro.py
index <HASH>..<HASH> 100644
--- a/fermipy/castro.py
+++ b/fermipy/castro.py
@@ -1197,6 +1197,11 @@ class TSCube(object):
self._norm_type = norm_type
@property
+ def nvals(self):
+ """Return the number of values in the tscube"""
+ return self._norm_vals.shape[0]
+
+ @property
def tsmap(self):
""" return the Map of the TestStatistic value """
return self._tsmap
@@ -1257,8 +1262,20 @@ class TSCube(object):
tab_s = Table.read(fitsfile, 'SCANDATA')
tab_f = Table.read(fitsfile, 'FITDATA')
- emin = np.array(tab_e['E_MIN'] / 1E3)
- emax = np.array(tab_e['E_MAX'] / 1E3)
+ emin = np.array(tab_e['E_MIN'])
+ emax = np.array(tab_e['E_MAX'])
+ try:
+ if str(tab_e['E_MIN'].unit) == 'keV':
+ emin /= 1000.
+ except:
+ pass
+ try:
+ if str(tab_e['E_MAX'].unit) == 'keV':
+ emax /= 1000.
+ except:
+ pass
+
+
nebins = len(tab_e)
npred = tab_e['REF_NPRED']
|
Added unit checking when create CastroData from FITS files
|
diff --git a/media/boom/js/boom/page/settings.js b/media/boom/js/boom/page/settings.js
index <HASH>..<HASH> 100644
--- a/media/boom/js/boom/page/settings.js
+++ b/media/boom/js/boom/page/settings.js
@@ -306,7 +306,7 @@ boomPage.prototype.childsettings = function() {
page.saveSettings(url, $("form.b-form-settings").serialize())
.done(function() {
- page.saveSettings(url, {sequences : sequences}, 'Child page ordering saved, reloading page');
+ page.saveSettings('/cms/page/settings/sort_children/' + page.id, {sequences : sequences}, 'Child page ordering saved');
});
}
});
|
Bugfix: child page manual ordering not saving
|
diff --git a/test_duct.py b/test_duct.py
index <HASH>..<HASH> 100644
--- a/test_duct.py
+++ b/test_duct.py
@@ -151,9 +151,10 @@ def test_nesting():
def test_cwd():
# Test cwd at both the top level and the command level, and that either can
- # be a pathlib Path.
- tmpdir = tempfile.mkdtemp()
- another = tempfile.mkdtemp()
+ # be a pathlib Path. Use realpath() on the paths we get from mkdtemp(),
+ # because on OSX there's a symlink in there.
+ tmpdir = os.path.realpath(tempfile.mkdtemp())
+ another = os.path.realpath(tempfile.mkdtemp())
assert tmpdir == pwd().read(cwd=tmpdir)
assert tmpdir == pwd(cwd=tmpdir).read(cwd=another)
if has_pathlib:
|
handle temp dir symlinks for tests on OSX
|
diff --git a/go/vt/mysqlctl/split.go b/go/vt/mysqlctl/split.go
index <HASH>..<HASH> 100644
--- a/go/vt/mysqlctl/split.go
+++ b/go/vt/mysqlctl/split.go
@@ -222,12 +222,15 @@ func (mysqld *Mysqld) CreateSplitSnapshot(dbName, keyName string, startKey, endK
return
}
+ // clean out and start fresh
+ relog.Info("removing previous snapshots: %v", mysqld.SnapshotDir)
+ if err = os.RemoveAll(mysqld.SnapshotDir); err != nil {
+ return
+ }
+
cloneSourcePath := path.Join(mysqld.SnapshotDir, dataDir, dbName+"-"+string(startKey)+","+string(endKey))
// clean out and start fresh
for _, _path := range []string{cloneSourcePath} {
- if err = os.RemoveAll(_path); err != nil {
- return
- }
if err = os.MkdirAll(_path, 0775); err != nil {
return
}
|
Removing all old snapshots when starting a multisnapshot. To have enough space to go on.
|
diff --git a/java/server/src/org/openqa/selenium/remote/server/handler/internal/ArgumentConverter.java b/java/server/src/org/openqa/selenium/remote/server/handler/internal/ArgumentConverter.java
index <HASH>..<HASH> 100644
--- a/java/server/src/org/openqa/selenium/remote/server/handler/internal/ArgumentConverter.java
+++ b/java/server/src/org/openqa/selenium/remote/server/handler/internal/ArgumentConverter.java
@@ -22,6 +22,7 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
+import org.openqa.selenium.remote.RemoteWebElement;
import org.openqa.selenium.remote.server.KnownElements;
import java.util.List;
@@ -51,6 +52,10 @@ public class ArgumentConverter implements Function<Object, Object> {
return converted;
}
+ if (arg instanceof RemoteWebElement) {
+ return knownElements.get(((RemoteWebElement) arg).getId());
+ }
+
if (arg instanceof List<?>) {
return Lists.newArrayList(Iterables.transform((List<?>) arg, this));
}
|
Convert RemoteWebElements decoded from JSON to "known elements".
As of commit e<I>b<I>dc<I>b<I>ecf9c7a9bbe<I>a<I>b<I>ad, the decoded JSON parameters may include a WebElement. It's necessary to convert the element when a RemoteWebElement is passed as the "id" param to SwitchToFrame.
Fixes #<I>.
|
diff --git a/pkg/services/alerting/datasources/backends.go b/pkg/services/alerting/datasources/backends.go
index <HASH>..<HASH> 100644
--- a/pkg/services/alerting/datasources/backends.go
+++ b/pkg/services/alerting/datasources/backends.go
@@ -2,9 +2,16 @@ package graphite
import (
"fmt"
+
m "github.com/grafana/grafana/pkg/models"
)
+// AlertDatasource is bacon
+type AlertDatasource interface {
+ GetSeries(job *m.AlertJob) (m.TimeSeriesSlice, error)
+}
+
+// GetSeries returns timeseries data from the datasource
func GetSeries(job *m.AlertJob) (m.TimeSeriesSlice, error) {
if job.Datasource.Type == m.DS_GRAPHITE {
return GraphiteClient{}.GetSeries(job)
|
feat(alerting): add interface for alert backend
|
diff --git a/src/main/java/org/fit/layout/cssbox/BoxNode.java b/src/main/java/org/fit/layout/cssbox/BoxNode.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/fit/layout/cssbox/BoxNode.java
+++ b/src/main/java/org/fit/layout/cssbox/BoxNode.java
@@ -14,6 +14,7 @@ import java.util.List;
import java.util.Map;
import java.util.Vector;
+import org.fit.cssbox.css.CSSUnits;
import org.fit.cssbox.layout.BlockReplacedBox;
import org.fit.cssbox.layout.Box;
import org.fit.cssbox.layout.ElementBox;
@@ -571,7 +572,7 @@ public class BoxNode extends GenericTreeNode implements org.fit.layout.model.Box
Color clr = null;
if (tclr != null)
- clr = tclr.getValue();
+ clr = CSSUnits.convertColor(tclr.getValue());
if (clr == null)
{
clr = box.getVisualContext().getColor();
|
Update to the new jStyleParser color API
|
diff --git a/src/Snowflake/ImportBase.php b/src/Snowflake/ImportBase.php
index <HASH>..<HASH> 100644
--- a/src/Snowflake/ImportBase.php
+++ b/src/Snowflake/ImportBase.php
@@ -80,8 +80,6 @@ abstract class ImportBase implements ImportInterface
);
}
- $this->dropTable($stagingTableName);
-
$this->importedColumns = $columns;
return new Result([
|
snowflake: removed manual drop of temporary table
|
diff --git a/tornado/test/process_test.py b/tornado/test/process_test.py
index <HASH>..<HASH> 100644
--- a/tornado/test/process_test.py
+++ b/tornado/test/process_test.py
@@ -179,6 +179,9 @@ class SubprocessTest(AsyncTestCase):
self.assertEqual(data, b"\n")
def test_stderr(self):
+ # This test is mysteriously flaky on twisted: it succeeds, but logs
+ # an error of EBADF on closing a file descriptor.
+ skip_if_twisted()
subproc = Subprocess([sys.executable, '-u', '-c',
r"import sys; sys.stderr.write('hello\n')"],
stderr=Subprocess.STREAM,
|
Skip another subprocess test that is flaky on twisted
|
diff --git a/src/python/pants/bin/pants_exe.py b/src/python/pants/bin/pants_exe.py
index <HASH>..<HASH> 100644
--- a/src/python/pants/bin/pants_exe.py
+++ b/src/python/pants/bin/pants_exe.py
@@ -56,6 +56,8 @@ def _help(version, root_dir):
print()
print('Available subcommands:\n\t%s' % '\n\t'.join(_find_all_commands()))
print()
+ print('Friendly docs: http://pantsbuild.github.io/')
+ print()
print("""Default subcommand flags can be stored in ~/.pantsrc using the 'options' key of a
section named for the subcommand in ini style format, ie:
[build]
|
Pants help text += link to web site
|
diff --git a/src/Spryker/Console/InstallConsoleCommand.php b/src/Spryker/Console/InstallConsoleCommand.php
index <HASH>..<HASH> 100644
--- a/src/Spryker/Console/InstallConsoleCommand.php
+++ b/src/Spryker/Console/InstallConsoleCommand.php
@@ -234,7 +234,7 @@ class InstallConsoleCommand extends Command
*/
protected function getEnvironment()
{
- $environment = (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development');
+ $environment = (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production');
return $environment;
}
|
PS-<I> Use staging/live env configuration by default (production)
|
diff --git a/views/badge.py b/views/badge.py
index <HASH>..<HASH> 100644
--- a/views/badge.py
+++ b/views/badge.py
@@ -104,18 +104,25 @@ def doi_badge(doi):
if pid is None:
return abort(404)
- return badge(doi)
+ style = request.args.get('style', None)
+
+ return badge(doi, style)
@blueprint.route("/<int:user_id>/<path:repository>.png", methods=["GET"])
@ssl_required
def index_old(user_id, repository):
"""Legacy support for old badge icons."""
- return redirect(url_for('.index', user_id=user_id, repository=repository))
+ style = request.args.get('style', None)
+ full_url = url_for('.index', user_id=user_id,
+ repository=repository, style=style)
+ return redirect(full_url)
@blueprint.route("/doi/<path:doi>.png", methods=["GET"])
@ssl_required
def doi_badge_old(doi):
"""Legacy support for old badge icons."""
- return redirect(url_for('.doi_badge', doi=doi))
+ style = request.args.get('style', None)
+ full_url = url_for('.doi_badge', doi=doi, style=style)
+ return redirect(full_url)
|
github: activate badge style support for DOI
* Adds support for `style` while generating a badge for
specific DOI. (addresses #<I>).
|
diff --git a/bika/lims/content/bikasetup.py b/bika/lims/content/bikasetup.py
index <HASH>..<HASH> 100644
--- a/bika/lims/content/bikasetup.py
+++ b/bika/lims/content/bikasetup.py
@@ -302,6 +302,7 @@ schema = BikaFolderSchema.copy() + Schema((
{'portal_type': 'ReferenceSample', 'prefix': 'RS', 'padding': '4'},
{'portal_type': 'SupplyOrder', 'prefix': 'O', 'padding': '3'},
{'portal_type': 'Worksheet', 'prefix': 'WS', 'padding': '4'},
+ {'portal_type': 'Pricelist', 'prefix': 'PL', 'padding': '4'},
],
# fixedSize=8,
widget=RecordsWidget(
diff --git a/bika/lims/content/pricelist.py b/bika/lims/content/pricelist.py
index <HASH>..<HASH> 100644
--- a/bika/lims/content/pricelist.py
+++ b/bika/lims/content/pricelist.py
@@ -108,7 +108,7 @@ def create_price_list(instance):
cat = None
if obj.getPrice():
price = float(obj.getPrice())
- totalprice = obj.getTotalPrice()
+ totalprice = float(obj.getTotalPrice())
vat = totalprice - price
else:
price = 0
|
Add Pricelist prefix, and fix type error in VAT calculation
|
diff --git a/pyes/queryset.py b/pyes/queryset.py
index <HASH>..<HASH> 100644
--- a/pyes/queryset.py
+++ b/pyes/queryset.py
@@ -332,7 +332,7 @@ class QuerySet(object):
and returning the created object.
"""
obj = self.model(**kwargs)
- meta = obj.get_meta()
+ meta = obj.get_meta()
meta.connection = get_es_connection(self.es_url, self.es_kwargs)
meta.index=self.index
meta.type=self.type
|
fixed inconsistent use to QuerySet
it would raise an Error under python<I>
the line <I>:
meta = obj.get_meta()
^
TabError: inconsistent use of tabs and spaces in indentation
|
diff --git a/example/app.js b/example/app.js
index <HASH>..<HASH> 100644
--- a/example/app.js
+++ b/example/app.js
@@ -103,10 +103,12 @@ dom.downloadMap[1].onclick = function () {
dom.uploadMap[0].onchange = function (event) {
uploadMap(map, event);
+ dom.uploadMap[0].value = "";
};
dom.uploadMap[1].onchange = function (event) {
uploadMap(testMap, event);
+ dom.uploadMap[1].value = "";
};
dom.downloadImage[0].onclick = function () {
|
[fix] reset file input value after map upload
|
diff --git a/public/js/source/custom-images-grifus-admin.js b/public/js/source/custom-images-grifus-admin.js
index <HASH>..<HASH> 100644
--- a/public/js/source/custom-images-grifus-admin.js
+++ b/public/js/source/custom-images-grifus-admin.js
@@ -23,8 +23,8 @@
url: eliasis.ajax_url,
type: "post",
data: {
- action: 'replaceOldImages',
- custom_nonce : eliasis.custom_nonce
+ action: 'replaceOldImages',
+ nonce : eliasis.nonce
},
success:function(data) {
|
Updated to <I> version
|
diff --git a/packages/server-web/src/client/store.js b/packages/server-web/src/client/store.js
index <HASH>..<HASH> 100644
--- a/packages/server-web/src/client/store.js
+++ b/packages/server-web/src/client/store.js
@@ -3,11 +3,15 @@ import { replay } from "@todastic/storage-events";
export const store = { todos: [], isAuthenticated: false };
const allEvents = [];
+let currentEventPositon = -1;
export function processEvent(event) {
// console.log(new Date(), "processing event", event);
- allEvents.push(event);
- store.todos = replay(allEvents).todos;
+ if (event.position > currentEventPositon) {
+ allEvents.push(event);
+ currentEventPositon = event.position;
+ store.todos = replay(allEvents).todos;
+ }
// console.log("new store.todos", store.todos);
}
|
Only process new events. Fix #<I>
|
diff --git a/lib/aws/xml/parser.rb b/lib/aws/xml/parser.rb
index <HASH>..<HASH> 100644
--- a/lib/aws/xml/parser.rb
+++ b/lib/aws/xml/parser.rb
@@ -73,15 +73,11 @@ module Aws
end
def member(shape, raw)
- case shape
- when Seahorse::Model::Shapes::StructureShape
- structure(shape, raw)
- when Seahorse::Model::Shapes::ListShape
- list(shape, raw)
- when Seahorse::Model::Shapes::MapShape
- map(shape, raw)
- else
- raw
+ case shape.type
+ when :structure then structure(shape, raw)
+ when :list then list(shape, raw)
+ when :map then map(shape, raw)
+ else raw
end
end
|
Xml::Parser no longer does type checking by class, now uses the Shape#type property.
|
diff --git a/source/core/oxmodule.php b/source/core/oxmodule.php
index <HASH>..<HASH> 100644
--- a/source/core/oxmodule.php
+++ b/source/core/oxmodule.php
@@ -247,7 +247,7 @@ class oxModule extends oxSuperCfg
}
} else {
$aDisabledModules = (array) $this->getConfig()->getConfigParam('aDisabledModules');
- if ( is_array( $aDisabledModules ) && !in_array( $sId, $aDisabledModules ) ) {
+ if ( !empty( $aDisabledModules ) && !in_array( $sId, $aDisabledModules ) ) {
$blActive = true;
}
}
|
in method isActive changed check from checking variable is array to checking if it is not empty
|
diff --git a/lib/active_median.rb b/lib/active_median.rb
index <HASH>..<HASH> 100644
--- a/lib/active_median.rb
+++ b/lib/active_median.rb
@@ -5,7 +5,7 @@ require "active_median/version"
module ActiveMedian
def self.create_function
# create median method
- # http://wiki.postgresql.org/wiki/Aggregate_Median
+ # https://wiki.postgresql.org/wiki/Aggregate_Median
ActiveRecord::Base.connection.execute <<-SQL
CREATE OR REPLACE FUNCTION median(anyarray)
RETURNS float8 AS
|
Use https url [skip ci]
|
diff --git a/loompy/loompy.py b/loompy/loompy.py
index <HASH>..<HASH> 100755
--- a/loompy/loompy.py
+++ b/loompy/loompy.py
@@ -769,7 +769,7 @@ def _create_sparse(filename: str, matrix: np.ndarray, row_attrs: Dict[str, np.nd
raise FileExistsError("Cannot overwrite existing file " + filename)
logging.info("Converting to csc format")
matrix = matrix.tocsc()
- window = 64
+ window = 6400
ix = 0
while ix < matrix.shape[1]:
window = min(window, matrix.shape[1] - ix)
|
Performance bug when creating from sparse
|
diff --git a/src/Domain/Generic/Model.php b/src/Domain/Generic/Model.php
index <HASH>..<HASH> 100644
--- a/src/Domain/Generic/Model.php
+++ b/src/Domain/Generic/Model.php
@@ -40,6 +40,7 @@ abstract class Model implements ModelInterface
* @return $this
*
* @throws IdAlreadyAssignedException if attempting to re-assign $id
+ * @throws InvalidIdException if the $id is of the wrong type
*/
public function assignId(ModelIdInterface $id)
{
|
Added missing exception to method DocBlock
|
diff --git a/hugolib/config.go b/hugolib/config.go
index <HASH>..<HASH> 100644
--- a/hugolib/config.go
+++ b/hugolib/config.go
@@ -585,7 +585,6 @@ func loadDefaultSettingsFor(v *viper.Viper) error {
v.SetDefault("cleanDestinationDir", false)
v.SetDefault("watch", false)
- v.SetDefault("metaDataFormat", "toml")
v.SetDefault("resourceDir", "resources")
v.SetDefault("publishDir", "public")
v.SetDefault("themesDir", "themes")
|
Remove metaDataFormat setting
Not in use anymore.
|
diff --git a/ttnctl/cmd/device.go b/ttnctl/cmd/device.go
index <HASH>..<HASH> 100644
--- a/ttnctl/cmd/device.go
+++ b/ttnctl/cmd/device.go
@@ -138,6 +138,10 @@ var devicesInfoCmd = &cobra.Command{
fmt.Println("Dynamic device:")
fmt.Println()
+ fmt.Printf(" AppEUI: %X\n", appEUI)
+ fmt.Printf(" {%s}\n", cStyle(appEUI))
+
+ fmt.Println()
fmt.Printf(" DevEUI: %X\n", device.DevEUI)
fmt.Printf(" {%s}\n", cStyle(device.DevEUI))
|
[ttnctl] Print AppEUI for OTAA devices
|
diff --git a/paging_result.go b/paging_result.go
index <HASH>..<HASH> 100644
--- a/paging_result.go
+++ b/paging_result.go
@@ -48,6 +48,8 @@ func newPagingResult(session *Session, res Result) (*PagingResult, error) {
return nil, err
}
+ paging.UsageInfo = res.UsageInfo()
+
if paging.Paging != nil {
pr.previous = paging.Paging.Previous
pr.next = paging.Paging.Next
|
fix #<I> paging.UsageInfo is not initialized in the first page
|
diff --git a/pythonforandroid/bdistapk.py b/pythonforandroid/bdistapk.py
index <HASH>..<HASH> 100644
--- a/pythonforandroid/bdistapk.py
+++ b/pythonforandroid/bdistapk.py
@@ -87,7 +87,8 @@ class BdistAPK(Command):
'that.')
bdist_dir = 'build/bdist.android-{}'.format(self.arch)
- rmtree(bdist_dir)
+ if exists(bdist_dir):
+ rmtree(bdist_dir)
makedirs(bdist_dir)
globs = []
|
Check if bdist_dir exists before removing
|
diff --git a/lib/bummr/outdated.rb b/lib/bummr/outdated.rb
index <HASH>..<HASH> 100644
--- a/lib/bummr/outdated.rb
+++ b/lib/bummr/outdated.rb
@@ -8,10 +8,10 @@ module Bummr
def outdated_gems(all_gems: false)
results = []
- options = []
- options << "--strict" unless all_gems
+ options = ""
+ options << " --strict" unless all_gems
- Open3.popen2("bundle outdated", *options) do |_std_in, std_out|
+ Open3.popen2("bundle outdated" + options) do |_std_in, std_out|
while line = std_out.gets
puts line
gem = parse_gem_from(line)
diff --git a/spec/lib/outdated_spec.rb b/spec/lib/outdated_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/outdated_spec.rb
+++ b/spec/lib/outdated_spec.rb
@@ -53,7 +53,7 @@ describe Bummr::Outdated do
end
it "defaults to false" do
- expect(Open3).to receive(:popen2).with("bundle outdated", "--strict").and_yield(nil, stdoutput)
+ expect(Open3).to receive(:popen2).with("bundle outdated --strict").and_yield(nil, stdoutput)
allow(Bummr::Outdated.instance).to receive(:gemfile).and_return gemfile
|
Fix "no such file or directory" error
- Resolves <URL>
|
diff --git a/tests/Unit/File/ImageOptionsTest.php b/tests/Unit/File/ImageOptionsTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/File/ImageOptionsTest.php
+++ b/tests/Unit/File/ImageOptionsTest.php
@@ -118,17 +118,17 @@ class ImageOptionsTest extends TestCase
$options = new ImageOptions();
$options->setQuality(50);
- $this->assertSame('fm=jpg&q=50', $options->getQueryString());
+ $this->assertSame('q=50', $options->getQueryString());
}
- public function testQueryQualityOverridesFormat()
+ public function testQueryQualityDoesNotOverrideFormat()
{
$options = (new ImageOptions())
->setFormat('png')
->setQuality(50)
;
- $this->assertSame('fm=jpg&q=50', $options->getQueryString());
+ $this->assertSame('fm=png&q=50', $options->getQueryString());
}
public function testQueryProgressive()
|
Fix tests after PR #<I>
|
diff --git a/tohu/v6/spawn_mapping.py b/tohu/v6/spawn_mapping.py
index <HASH>..<HASH> 100644
--- a/tohu/v6/spawn_mapping.py
+++ b/tohu/v6/spawn_mapping.py
@@ -18,5 +18,5 @@ class SpawnMapping:
try:
return self.mapping[g]
except KeyError:
- logger.warning(f"Generator does not occur in spawn mapping: {g}")
+ logger.debug(f"Generator does not occur in spawn mapping: {g}")
return g
\ No newline at end of file
|
Demote warning to debugging message because this case is expected
|
diff --git a/parsl/app/bash.py b/parsl/app/bash.py
index <HASH>..<HASH> 100644
--- a/parsl/app/bash.py
+++ b/parsl/app/bash.py
@@ -70,7 +70,7 @@ def remote_side_bash_executor(func, *args, **kwargs):
returncode = proc.returncode
except subprocess.TimeoutExpired:
- raise pe.AppTimeout("[{}] App exceeded walltime: {}".format(func_name, timeout))
+ raise pe.AppTimeout("[{}] App exceeded walltime: {} seconds".format(func_name, timeout))
except Exception as e:
raise pe.AppException("[{}] App caught exception with returncode: {}".format(func_name, returncode), e)
|
Add units to walltime human readable message (#<I>)
|
diff --git a/pymongo/replica_set_connection.py b/pymongo/replica_set_connection.py
index <HASH>..<HASH> 100644
--- a/pymongo/replica_set_connection.py
+++ b/pymongo/replica_set_connection.py
@@ -191,8 +191,6 @@ class ReplicaSetConnection(common.BaseObject):
super(ReplicaSetConnection, self).__init__(**self.__opts)
- self.slave_okay = True
-
if db_name and username is None:
warnings.warn("must provide a username and password "
"to authenticate to %s" % (db_name,))
@@ -306,6 +304,13 @@ class ReplicaSetConnection(common.BaseObject):
return self.__arbiters
@property
+ def slave_okay(self):
+ """Is it OK to perform queries on a secondary? This is
+ always True for an instance of ReplicaSetConnection.
+ """
+ return True
+
+ @property
def max_pool_size(self):
"""The maximum pool size limit set for this connection.
"""
|
ReplicaSetConnection.slave_okay is always True PYTHON-<I>
|
diff --git a/tests/int/test_int_docker.py b/tests/int/test_int_docker.py
index <HASH>..<HASH> 100644
--- a/tests/int/test_int_docker.py
+++ b/tests/int/test_int_docker.py
@@ -51,7 +51,7 @@ def test_int_docker_git_gem_and_pip_on_mult(helpers):
@pytest.mark.docker
def test_int_docker_pacman_on_arch(helpers):
helpers.run(
- 'pyinfra @docker/archlinux pacman.py',
+ 'pyinfra @docker/archlinux:base-20210131.0.14634 pacman.py',
expected_lines=['docker build complete'],
)
|
Pin Archlinux tag in Docker tests.
|
diff --git a/classes/ValidFormBuilder/SelectGroup.php b/classes/ValidFormBuilder/SelectGroup.php
index <HASH>..<HASH> 100644
--- a/classes/ValidFormBuilder/SelectGroup.php
+++ b/classes/ValidFormBuilder/SelectGroup.php
@@ -65,7 +65,7 @@ class SelectGroup extends Base
{
$strOutput = "<optgroup label=\"{$this->__label}\">\n";
foreach ($this->__options as $option) {
- $strOutput .= $option->toHtml($value);
+ $strOutput .= $option->toHtmlInternal($value);
}
$strOutput .= "</optgroup>\n";
@@ -80,9 +80,9 @@ class SelectGroup extends Base
* @param boolean $selected Set this option as selected by default
* @return \ValidFormBuilder\SelectOption
*/
- public function addField($label, $value, $selected = false)
+ public function addField($label, $value, $selected = false, $meta = array())
{
- $objOption = new SelectOption($label, $value, $selected);
+ $objOption = new SelectOption($label, $value, $selected, $meta);
$objOption->setMeta("parent", $this, true);
$this->__options->addObject($objOption);
|
Fixed an old rendering of optgroups.
Optgroups would not be rendered correctly.
|
diff --git a/moco-core/src/main/java/com/github/dreamhead/moco/extractor/CookieRequestExtractor.java b/moco-core/src/main/java/com/github/dreamhead/moco/extractor/CookieRequestExtractor.java
index <HASH>..<HASH> 100644
--- a/moco-core/src/main/java/com/github/dreamhead/moco/extractor/CookieRequestExtractor.java
+++ b/moco-core/src/main/java/com/github/dreamhead/moco/extractor/CookieRequestExtractor.java
@@ -6,9 +6,6 @@ import com.google.common.collect.ImmutableMap;
import java.util.Optional;
-import static java.util.Optional.empty;
-import static java.util.Optional.ofNullable;
-
public final class CookieRequestExtractor extends HttpRequestExtractor<String> {
private final CookiesRequestExtractor extractor = new CookiesRequestExtractor();
|
removed unused import in cookie request extractor
|
diff --git a/src/renderer/layer/vectorlayer/VectorLayerCanvasRenderer.js b/src/renderer/layer/vectorlayer/VectorLayerCanvasRenderer.js
index <HASH>..<HASH> 100644
--- a/src/renderer/layer/vectorlayer/VectorLayerCanvasRenderer.js
+++ b/src/renderer/layer/vectorlayer/VectorLayerCanvasRenderer.js
@@ -28,7 +28,11 @@ class VectorLayerRenderer extends OverlayLayerCanvasRenderer {
}
if (!this._imageData) {
const { width, height } = this.context.canvas;
- this._imageData = this.context.getImageData(0, 0, width, height);
+ try {
+ this._imageData = this.context.getImageData(0, 0, width, height);
+ } catch (error) {
+ console.warn('hit detect failed with tainted canvas, some geometries have external resources in another domain:\n', error);
+ }
}
return this._imageData;
}
|
fix VectorLayerRenderer getImageData error when some geometries have external resources in another domain fix #<I> (#<I>)
|
diff --git a/pkg/server/server.go b/pkg/server/server.go
index <HASH>..<HASH> 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -179,10 +179,10 @@ func (s *Server) Run() (err error) {
}
err := service.Run(s.context)
- // Mark that we are in shutdown mode
- // So no more services are started
- s.shutdownInProgress = true
if err != nil {
+ // Mark that we are in shutdown mode
+ // So no more services are started
+ s.shutdownInProgress = true
if err != context.Canceled {
// Server has crashed.
s.log.Error("Stopped "+descriptor.Name, "reason", err)
|
Registry: Fix service shutdown mode trigger location (#<I>)
|
diff --git a/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java b/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
+++ b/library/src/main/java/com/mikepenz/materialdrawer/Drawer.java
@@ -524,7 +524,7 @@ public class Drawer {
* @param fireOnClick true if the click listener should be called
*/
public void setSelection(long identifier, boolean fireOnClick) {
- SelectExtension select = FastAdapter.getExtension(getAdapter(), SelectExtension.class);
+ SelectExtension<IDrawerItem> select = getAdapter().getExtension(SelectExtension.class);
if(select != null) {
select.deselect();
select.selectByIdentifier(identifier, false, true);
@@ -588,7 +588,7 @@ public class Drawer {
*/
public boolean setSelectionAtPosition(int position, boolean fireOnClick) {
if (mDrawerBuilder.mRecyclerView != null) {
- SelectExtension select = FastAdapter.getExtension(getAdapter(), SelectExtension.class);
+ SelectExtension<IDrawerItem> select = getAdapter().getExtension(SelectExtension.class);
if (select != null) {
select.deselect();
select.select(position, false);
|
* adjust for new fastadapter adjustments
|
diff --git a/src/main/java/org/mariadb/jdbc/CallableProcedureStatement.java b/src/main/java/org/mariadb/jdbc/CallableProcedureStatement.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/mariadb/jdbc/CallableProcedureStatement.java
+++ b/src/main/java/org/mariadb/jdbc/CallableProcedureStatement.java
@@ -101,6 +101,8 @@ public abstract class CallableProcedureStatement extends MariaDbPreparedStatemen
CallableProcedureStatement clone = (CallableProcedureStatement) super.clone(connection);
clone.params = params;
clone.parameterMetadata = parameterMetadata;
+ clone.hasInOutParameters = hasInOutParameters;
+ clone.outputParameterMapper = outputParameterMapper;
return clone;
}
|
[misc] correcting cloning CallableProcedureStatement
|
diff --git a/pkg/registry/core/pod/strategy.go b/pkg/registry/core/pod/strategy.go
index <HASH>..<HASH> 100644
--- a/pkg/registry/core/pod/strategy.go
+++ b/pkg/registry/core/pod/strategy.go
@@ -237,7 +237,7 @@ func PodToSelectableFields(pod *api.Pod) fields.Set {
// amount of allocations needed to create the fields.Set. If you add any
// field here or the number of object-meta related fields changes, this should
// be adjusted.
- podSpecificFieldsSet := make(fields.Set, 7)
+ podSpecificFieldsSet := make(fields.Set, 8)
podSpecificFieldsSet["spec.nodeName"] = pod.Spec.NodeName
podSpecificFieldsSet["spec.restartPolicy"] = string(pod.Spec.RestartPolicy)
podSpecificFieldsSet["spec.schedulerName"] = string(pod.Spec.SchedulerName)
|
Avoid reallocating of map in PodToSelectableFields
|
diff --git a/trovebox/http.py b/trovebox/http.py
index <HASH>..<HASH> 100644
--- a/trovebox/http.py
+++ b/trovebox/http.py
@@ -104,7 +104,9 @@ class Http(object):
self._logger.info("============================")
self._logger.info("GET %s" % url)
self._logger.info("---")
- self._logger.info(response.text)
+ self._logger.info(response.text[:1000])
+ if len(response.text) > 1000:
+ self._logger.info("[Response truncated to 1000 characters]")
self.last_url = url
self.last_params = params
@@ -158,7 +160,9 @@ class Http(object):
if files:
self._logger.info("files: %s" % repr(files))
self._logger.info("---")
- self._logger.info(response.text)
+ self._logger.info(response.text[:1000])
+ if len(response.text) > 1000:
+ self._logger.info("[Response truncated to 1000 characters]")
self.last_url = url
self.last_params = params
|
Truncate response logging to <I> characters
|
diff --git a/test/test_rpc.py b/test/test_rpc.py
index <HASH>..<HASH> 100644
--- a/test/test_rpc.py
+++ b/test/test_rpc.py
@@ -626,7 +626,7 @@ def test_reply_queue_removed_on_expiry(
@skip_if_no_toxiproxy
-class TestDisconnectedWhileWaitingForReply(object):
+class TestDisconnectedWhileWaitingForReply(object): # pragma: no cover
@pytest.yield_fixture(autouse=True)
def fast_reconnects(self):
|
pragma: no cover on test we don't expect to run
|
diff --git a/app/scripts/tests/components/Block.spec.js b/app/scripts/tests/components/Block.spec.js
index <HASH>..<HASH> 100644
--- a/app/scripts/tests/components/Block.spec.js
+++ b/app/scripts/tests/components/Block.spec.js
@@ -4,7 +4,8 @@ import React from 'react'
import { expect } from 'chai'
import { actions as blockActions } from '../../../modules/mobilizations/blocks'
-import { Block, Widget, ColorPicker, DropDownMenu, DropDownMenuItem } from './../../components'
+import { Widget, ColorPicker, DropDownMenu, DropDownMenuItem } from './../../components'
+import { Block } from '../../../modules/mobilizations/blocks/components/block'
const widget1 = { block_id: 1, id: 1, settings: { content: 'My widget1' } }
const widget2 = { block_id: 2, id: 2, settings: { content: 'My widget2' } }
|
Fix some block related tests; Skip some tests for now, needs to refactor #<I>
|
diff --git a/src/fx.js b/src/fx.js
index <HASH>..<HASH> 100644
--- a/src/fx.js
+++ b/src/fx.js
@@ -81,7 +81,7 @@ jQuery.fn.extend({
for ( p in prop ) {
if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
- return jQuery.isFunction(opt.complete) && opt.complete.call(this);
+ return opt.complete.call(this);
if ( p == "height" || p == "width" ) {
// Store display property
@@ -379,7 +379,7 @@ jQuery.fx.prototype = {
}
// If a callback was provided, execute it
- if ( done && jQuery.isFunction( this.options.complete ) )
+ if ( done )
// Execute the complete function
this.options.complete.call( this.elem );
|
jquery fx: removing 2 unnecessary isFunction calls, options.complete is ALWAYS a function.
|
diff --git a/torext/mongodb/dstruct.py b/torext/mongodb/dstruct.py
index <HASH>..<HASH> 100644
--- a/torext/mongodb/dstruct.py
+++ b/torext/mongodb/dstruct.py
@@ -8,6 +8,9 @@ from hashlib import md5
from torext.errors import ValidationError
from bson.objectid import ObjectId
+# TODO change dict building mechanism:
+# 1. no str & unicode difference, only str
+# 2. all allow None, except: list, dict, ObjectId
DEFAULT_TYPE_VALUE = {
int: int,
|
add a little comments on dstruct for future ref
|
diff --git a/abilian/core/jinjaext.py b/abilian/core/jinjaext.py
index <HASH>..<HASH> 100644
--- a/abilian/core/jinjaext.py
+++ b/abilian/core/jinjaext.py
@@ -6,6 +6,7 @@ from __future__ import absolute_import
from functools import partial
+import lxml.html
from jinja2.ext import Extension
from jinja2 import nodes
@@ -39,6 +40,9 @@ class DeferredJS(object):
class DeferredJSExtension(Extension):
"""
Put JS fragment at the end of the document in a script tag.
+
+ The JS fragment can contains <script> tag so that your favorite editor
+ keeps doing proper indentation, syntax highlighting...
"""
tags = set(['deferJS', 'deferredJS'])
@@ -56,7 +60,20 @@ class DeferredJSExtension(Extension):
[], [], body).set_lineno(lineno)
def defer_nodes(self, caller):
- body = caller()
+ body = u'<div>{}</div>'.format(caller().strip())
+
+ # remove 'script' tag in immediate children, if any
+ fragment = lxml.html.fragment_fromstring(body)
+ for child in fragment:
+ if child.tag == 'script':
+ child.drop_tag() # side effect on fragment.text or previous_child.tail!
+
+ body = [fragment.text]
+ for child in fragment:
+ body.append(lxml.html.tostring(child))
+ body.append(child.tail)
+ body = u''.join(body)
+
deferred_js.append(body)
return u''
|
deferJS: allow to let <script> tag within deferJS (for editor syntax highlight for example), and remove it when collecting fragment
|
diff --git a/lib/Socket.php b/lib/Socket.php
index <HASH>..<HASH> 100644
--- a/lib/Socket.php
+++ b/lib/Socket.php
@@ -66,9 +66,7 @@ class Socket implements Stream {
// Error reporting suppressed since fread() produces a warning if the stream unexpectedly closes.
$data = @\fread($stream, $bytes !== null ? $bytes - $buffer->getLength() : self::CHUNK_SIZE);
- if ($data === '' && (\feof($stream) || !\is_resource($stream))) {
- $this->close();
-
+ if ($data === false || ($data === '' && (\feof($stream) || !\is_resource($stream)))) {
if ($bytes !== null || $delimiter !== null) { // Fail bounded reads.
$deferred->fail(new ClosedException("The stream unexpectedly closed"));
return;
@@ -281,7 +279,6 @@ class Socket implements Stream {
return new Failure(new SocketException("The stream is not writable"));
}
- $data = (string) $data;
$length = \strlen($data);
$written = 0;
|
Remove call to close method from static context
|
diff --git a/IDBStore.js b/IDBStore.js
index <HASH>..<HASH> 100644
--- a/IDBStore.js
+++ b/IDBStore.js
@@ -144,6 +144,21 @@
this.store = this.db.createObjectStore(this.storeName, { keyPath: this.keyPath, autoIncrement: this.autoIncrement});
}
+
+ this.indexes.forEach(function(indexData){
+ var indexName = indexData.name;
+
+ // normalize and provide existing keys
+ indexData.keyPath = indexData.keyPath || indexName;
+ indexData.unique = !!indexData.unique;
+ indexData.multiEntry = !!indexData.multiEntry;
+
+ if(!indexName){
+ throw new Error('Cannot create index: No index name given.');
+ }
+
+ }, this);
+
}.bind(this);
},
|
Check indexes, throw if no name is given
|
diff --git a/lib/attachs/console.rb b/lib/attachs/console.rb
index <HASH>..<HASH> 100644
--- a/lib/attachs/console.rb
+++ b/lib/attachs/console.rb
@@ -3,7 +3,7 @@ module Attachs
class << self
def detect_content_type(path)
- run "file -Ib '#{path}'" do |output|
+ run "file -ib '#{path}'" do |output|
output.split(';').first
end
end
|
Fix content type detection for bsd
|
diff --git a/volume/devicemapper/stats_test.go b/volume/devicemapper/stats_test.go
index <HASH>..<HASH> 100644
--- a/volume/devicemapper/stats_test.go
+++ b/volume/devicemapper/stats_test.go
@@ -11,7 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// +build unit
+// +build unit,linux,!darwin
package devicemapper
|
only run DM stats unit tests on linux
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -695,7 +695,7 @@ class BuildSupportMacOS(BuildSupport):
PylonConfig = os.path.join(
FrameworkPath,
FrameworkName,
- 'Versions/Current/Resources/Tools/pylon-config.sh'
+ 'Versions/Current/Resources/Tools/pylon-config'
)
DefineMacros = [
|
Fix name of python-config script on macOS. Resolves #<I>.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.