diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/easy_thumbnails/management/commands/thumbnail_cleanup.py b/easy_thumbnails/management/commands/thumbnail_cleanup.py index <HASH>..<HASH> 100644 --- a/easy_thumbnails/management/commands/thumbnail_cleanup.py +++ b/easy_thumbnails/management/commands/thumbnail_cleanup.py @@ -107,15 +107,15 @@ def queryset_iterator(queryset, chunksize=1000): The queryset iterator helps to keep the memory consumption down. And also making it easier to process for weaker computers. """ - - primary_key = 0 - last_pk = queryset.order_by('-pk')[0].pk - queryset = queryset.order_by('pk') - while primary_key < last_pk: - for row in queryset.filter(pk__gt=primary_key)[:chunksize]: - primary_key = row.pk - yield row - gc.collect() + if queryset.exists(): + primary_key = 0 + last_pk = queryset.order_by('-pk')[0].pk + queryset = queryset.order_by('pk') + while primary_key < last_pk: + for row in queryset.filter(pk__gt=primary_key)[:chunksize]: + primary_key = row.pk + yield row + gc.collect() class Command(BaseCommand):
Fixing crash that occurred when calling the 'thumbnail_cleanup' command when no thumbnails exist in the database
diff --git a/test/com/opera/core/systems/WindowTest.java b/test/com/opera/core/systems/WindowTest.java index <HASH>..<HASH> 100644 --- a/test/com/opera/core/systems/WindowTest.java +++ b/test/com/opera/core/systems/WindowTest.java @@ -103,7 +103,7 @@ public class WindowTest extends OperaDriverTestCase { } @Test - @Ignore(products = CORE, value = "window-manager service is not coupled to gogi tabs") + @Ignore(products = CORE, value = "gogi does not quit when closing last window") public void testCloseShouldQuitBrowserIfLastWindow() { driver.close(); assertFalse(driver.isRunning());
Modified my statement about gogi tabs
diff --git a/views/js/controller/backoffice.js b/views/js/controller/backoffice.js index <HASH>..<HASH> 100644 --- a/views/js/controller/backoffice.js +++ b/views/js/controller/backoffice.js @@ -34,11 +34,7 @@ define([ 'use strict'; function checkAjaxResponse(ajaxResponse) { - if (ajaxResponse && ajaxResponse !== null) { - return true; - } else { - return false; - } + return ajaxResponse && ajaxResponse !== null; } function checkAjaxResponseProperties(ajaxResponse) {
Update views/js/controller/backoffice.js
diff --git a/client/runtime.go b/client/runtime.go index <HASH>..<HASH> 100644 --- a/client/runtime.go +++ b/client/runtime.go @@ -64,14 +64,16 @@ func New(host, basePath string, schemes []string) *Runtime { // TODO: actually infer this stuff from the spec rt.Consumers = map[string]runtime.Consumer{ - runtime.JSONMime: runtime.JSONConsumer(), - runtime.XMLMime: runtime.XMLConsumer(), - runtime.TextMime: runtime.TextConsumer(), + runtime.JSONMime: runtime.JSONConsumer(), + runtime.XMLMime: runtime.XMLConsumer(), + runtime.TextMime: runtime.TextConsumer(), + runtime.DefaultMime: runtime.ByteStreamConsumer(), } rt.Producers = map[string]runtime.Producer{ - runtime.JSONMime: runtime.JSONProducer(), - runtime.XMLMime: runtime.XMLProducer(), - runtime.TextMime: runtime.TextProducer(), + runtime.JSONMime: runtime.JSONProducer(), + runtime.XMLMime: runtime.XMLProducer(), + runtime.TextMime: runtime.TextProducer(), + runtime.DefaultMime: runtime.ByteStreamProducer(), } rt.Transport = http.DefaultTransport rt.Jar = nil
add "application/octet-stream" to consumers and producers
diff --git a/src/modes/direct_select.js b/src/modes/direct_select.js index <HASH>..<HASH> 100644 --- a/src/modes/direct_select.js +++ b/src/modes/direct_select.js @@ -154,6 +154,7 @@ module.exports = function(ctx, opts) { features: ctx.store.getSelected().map(f => f.toGeoJSON()) }); selectedCoordPaths = []; + fireActionable(); if (feature.isValid() === false) { ctx.store.delete([featureId]); ctx.events.changeMode(Constants.modes.SIMPLE_SELECT, null); diff --git a/src/modes/simple_select.js b/src/modes/simple_select.js index <HASH>..<HASH> 100644 --- a/src/modes/simple_select.js +++ b/src/modes/simple_select.js @@ -275,6 +275,7 @@ module.exports = function(ctx, options = {}) { }, trash: function() { ctx.store.delete(ctx.store.getSelectedIds()); + fireActionable(); }, combineFeatures: function() { var selectedFeatures = ctx.store.getSelected();
Add actionable events to trash methods for simple and direct select Fixes #<I>
diff --git a/lib/lifx/client.rb b/lib/lifx/client.rb index <HASH>..<HASH> 100644 --- a/lib/lifx/client.rb +++ b/lib/lifx/client.rb @@ -57,8 +57,10 @@ module LIFX try_until -> { block.arity == 1 ? block.call(self) : block.call }, timeout: timeout, timeout_exception: DiscoveryTimeout, - condition_interval: condition_interval do + condition_interval: condition_interval, + action_interval: 1 do discover + refresh end self end
Discover now performs Light::Get at intervals. Closes #<I>
diff --git a/enabler/src/com/openxc/enabler/SettingsActivity.java b/enabler/src/com/openxc/enabler/SettingsActivity.java index <HASH>..<HASH> 100644 --- a/enabler/src/com/openxc/enabler/SettingsActivity.java +++ b/enabler/src/com/openxc/enabler/SettingsActivity.java @@ -29,6 +29,13 @@ import android.widget.Toast; import com.openxc.sinks.UploaderSink; import com.openxc.sources.network.NetworkVehicleDataSource; +/** + * Initialize and display all preferences for the OpenXC Enabler application. + * + * In order to select a trace file to use as a data source, the device must have + * a file manager application installed that responds to the GET_CONTENT intent, + * e.g. OI File Manager. + */ @TargetApi(12) public class SettingsActivity extends PreferenceActivity { private static String TAG = "SettingsActivity";
Note that a file manager is required to select a trace data source.
diff --git a/lxd/device/device_load.go b/lxd/device/device_load.go index <HASH>..<HASH> 100644 --- a/lxd/device/device_load.go +++ b/lxd/device/device_load.go @@ -40,6 +40,8 @@ func load(inst instance.Instance, state *state.State, name string, conf deviceCo dev = &nicMACVLAN{} case "sriov": dev = &nicSRIOV{} + case "ovn": + dev = &nicOVN{} } case "infiniband": switch nicType {
lxd/device/device/load: Adds OVN nic type support
diff --git a/library/Helper/Navigation.php b/library/Helper/Navigation.php index <HASH>..<HASH> 100644 --- a/library/Helper/Navigation.php +++ b/library/Helper/Navigation.php @@ -116,7 +116,7 @@ class Navigation return ''; } - return '<ul class="nav-mobile">' . $menu->render(false) . '</div>'; + return '<ul class="nav-mobile">' . $menu->render(false) . '</ul>'; } /**
Corrected closing tag for ul
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -57,6 +57,10 @@ setup( # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', ], # What does your project relate to?
update setup file to include <I>, <I>, and <I>
diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index <HASH>..<HASH> 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -65,7 +65,7 @@ Blockchain.prototype.initChainAndGetAddress = function() { // check if an account already exists, create one if not, return address result = this.runCommand(this.client.listAccountsCommand()); - if (result.output === undefined || result.output === '' || result.output.indexOf("Fatal") >= 0) { + if (result.output === undefined || result.output.match(/{(\w+)}/) === null || result.output.indexOf("Fatal") >= 0) { console.log("no accounts found".green); if (this.config.genesisBlock) { console.log("initializing genesis block".green);
fix for no accounts on init with warning messages
diff --git a/salt/modules/quota.py b/salt/modules/quota.py index <HASH>..<HASH> 100644 --- a/salt/modules/quota.py +++ b/salt/modules/quota.py @@ -64,9 +64,7 @@ def _parse_quota(mount, opts): continue comps = line.split() if mode == 'header': - if 'Report for' in line: - pass - elif 'Block grace time' in line: + if 'Block grace time' in line: blockg, inodeg = line.split(';') blockgc = blockg.split(': ') inodegc = inodeg.split(': ')
Remove pylint resulting in no-op overhead
diff --git a/test/test_core_ext.rb b/test/test_core_ext.rb index <HASH>..<HASH> 100644 --- a/test/test_core_ext.rb +++ b/test/test_core_ext.rb @@ -64,7 +64,7 @@ describe DR::CoreExt do it "Can compose functions" do somme=->(x,y) {x+y} - carre=->(x) {x^2} + carre=->(x) {x*x} carre.compose(somme).(2,3).must_equal(25) end
Still more tests for core_ext.rb
diff --git a/rake/lib/rake/filelist.rb b/rake/lib/rake/filelist.rb index <HASH>..<HASH> 100644 --- a/rake/lib/rake/filelist.rb +++ b/rake/lib/rake/filelist.rb @@ -10,7 +10,9 @@ module Rake filenames.each do |fn| case fn when Array - fn.each { |f| self << f } + fn.each { |f| self.add(f) } + when %r{[*?]} + add_matching(fn) else self << fn end @@ -22,6 +24,7 @@ module Rake Dir[pattern].each { |fn| self << fn } if pattern end end + private :add_matching def to_s self.join(' ')
Add now handles patterns as a special case. Add_matching is now private. git-svn-id: svn+ssh://rubyforge.org/var/svn/rake/trunk@<I> 5af<I>f1-ac1a-<I>-<I>d6-<I>a<I>c<I>ef
diff --git a/src/Commands/CrudControllerCommand.php b/src/Commands/CrudControllerCommand.php index <HASH>..<HASH> 100644 --- a/src/Commands/CrudControllerCommand.php +++ b/src/Commands/CrudControllerCommand.php @@ -123,15 +123,15 @@ class CrudControllerCommand extends GeneratorCommand } $snippet = <<<EOD -if (\$request->hasFile('{{fieldName}}')) { - \$uploadPath = public_path('/uploads/'); - - \$extension = \$request->file('{{fieldName}}')->getClientOriginalExtension(); - \$fileName = rand(11111, 99999) . '.' . \$extension; - - \$request->file('{{fieldName}}')->move(\$uploadPath, \$fileName); - \$requestData['{{fieldName}}'] = \$fileName; -} + if (\$request->hasFile('{{fieldName}}')) { + \$uploadPath = public_path('/uploads/'); + + \$extension = \$request->file('{{fieldName}}')->getClientOriginalExtension(); + \$fileName = rand(11111, 99999) . '.' . \$extension; + + \$request->file('{{fieldName}}')->move(\$uploadPath, \$fileName); + \$requestData['{{fieldName}}'] = \$fileName; + } EOD; $fieldsArray = explode(';', $fields);
Adding indentation to fileSnippet
diff --git a/lib/authem.rb b/lib/authem.rb index <HASH>..<HASH> 100644 --- a/lib/authem.rb +++ b/lib/authem.rb @@ -1,8 +1,8 @@ +require "authem/railtie" require "active_support/all" module Authem autoload :Controller, "authem/controller" - autoload :Railtie, "authem/railtie" autoload :Role, "authem/role" autoload :Session, "authem/session" autoload :Support, "authem/support"
Move authem/railtie back to explicit require
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -115,7 +115,7 @@ function configureTasks (grunt) { //"sauce_firefox", "sauce_safari", "sauce_ie_11", - "sauce_ie_8" + //"sauce_ie_8" ], captureTimeout: 120000 }
removing ie 8 for now
diff --git a/lib/epub/parser/content_document.rb b/lib/epub/parser/content_document.rb index <HASH>..<HASH> 100644 --- a/lib/epub/parser/content_document.rb +++ b/lib/epub/parser/content_document.rb @@ -25,8 +25,12 @@ module EPUB # @return [EPUB::ContentDocument::Navigation::Nav] nav Nav object def parse_navigation(element) nav = EPUB::ContentDocument::Navigation::Nav.new - nav.heading = find_heading element - nav.type = element['type'] + nav.heading = find_heading(element) + + ns_prefix, _ = element.namespaces.detect {|prefix, uri| uri == EPUB::NAMESPACES['epub']} + prefix = ns_prefix.split(':')[1] + attr_name = [prefix, 'type'].compact.join(':') + nav.type = element[attr_name] nav end
Fix for the change of Nokogiri <I>
diff --git a/urwid_datatable/datatable.py b/urwid_datatable/datatable.py index <HASH>..<HASH> 100644 --- a/urwid_datatable/datatable.py +++ b/urwid_datatable/datatable.py @@ -840,7 +840,7 @@ class DataTableRow(urwid.WidgetWrap): # focus_map = self.focus_map) self.pile = urwid.Pile([ - (1, urwid.Filler(self.row)) + ('weight', 1, self.row) ]) self.attr = urwid.AttrMap(self.pile, attr_map = self.attr_map, @@ -1578,7 +1578,7 @@ def main(): loop = None screen = urwid.raw_display.Screen() - screen.set_terminal_properties(256) + screen.set_terminal_properties(16) foreground_map = { "table_row": [ "light gray", "light gray" ],
Make rows weighted widgets rather than fixed height.
diff --git a/lib/lhc/version.rb b/lib/lhc/version.rb index <HASH>..<HASH> 100644 --- a/lib/lhc/version.rb +++ b/lib/lhc/version.rb @@ -1,3 +1,3 @@ module LHC - VERSION ||= '8.0.0' + VERSION ||= '8.1.0' end
increase version (#<I>) version increase for zipking
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ version = '0.7.dev0' install_requires = [] test_requires = [ - 'pytest', 'pytest-asyncio', 'coverage<3.99', 'coveralls' + 'pytest', 'coverage<3.99', 'coveralls' ] if sys.version_info[:2] < (3, 0): @@ -23,6 +23,9 @@ elif sys.version_info[:2] < (3, 3): test_requires.extend(['mock']) elif sys.version_info[:2] < (3, 4): install_requires.append('asyncio') + test_requires.append('pytest-asyncio') +else: + test_requires.append('pytest-asyncio') def read(*rnames):
Add unit tests for FastAGI #<I> - second attempt
diff --git a/ansigenome/utils.py b/ansigenome/utils.py index <HASH>..<HASH> 100644 --- a/ansigenome/utils.py +++ b/ansigenome/utils.py @@ -212,9 +212,9 @@ def yaml_load(path, input="", err_quit=False): """ try: if len(input) > 0: - return yaml.load(input) + return yaml.safe_load(input) elif len(path) > 0: - return yaml.load(file_to_string(path)) + return yaml.safe_load(file_to_string(path)) except Exception as err: file = os.path.basename(path) ui.error("",
Fix code execution vulnerability by switching to yaml.safe_load Ref: <URL>
diff --git a/src/imagelightbox.js b/src/imagelightbox.js index <HASH>..<HASH> 100644 --- a/src/imagelightbox.js +++ b/src/imagelightbox.js @@ -651,8 +651,8 @@ } }, - _preloadVideos = function () { - targets.each(function() { + _preloadVideos = function (elements) { + elements.each(function() { var videoOptions = $(this).data('ilb2Video'); if (videoOptions) { var id = $(this).data('ilb2Id'); @@ -763,10 +763,11 @@ _openHistory(); - _preloadVideos(); + _preloadVideos(targets); this.addToImageLightbox = function (elements) { _addTargets(elements); + _preloadVideos(elements); }; this.openHistory = function() {
Added support for video preloading when adding elements to a lightbox
diff --git a/pythainlp/util/thai_time.py b/pythainlp/util/thai_time.py index <HASH>..<HASH> 100644 --- a/pythainlp/util/thai_time.py +++ b/pythainlp/util/thai_time.py @@ -82,15 +82,15 @@ def thai_time(time: str, types: str = "24-hour") -> str: :Example: - thai_time("8:17").get_time() + thai_time("8:17") # output: # แปดนาฬิกาสิบเจ็ดนาที - thai_time("8:17",types="6-hour").get_time() + thai_time("8:17", types="6-hour") # output: # สองโมงเช้าสิบเจ็ดนาที - thai_time("8:17",types="modified-6-hour").get_time() + thai_time("8:17", types="modified-6-hour") # output: # แปดโมงสิบเจ็ดนาที """
Update thai_time.py
diff --git a/tests/commands/migrate_config_test.py b/tests/commands/migrate_config_test.py index <HASH>..<HASH> 100644 --- a/tests/commands/migrate_config_test.py +++ b/tests/commands/migrate_config_test.py @@ -148,6 +148,7 @@ def test_migrate_config_sha_to_rev(tmpdir): ' hooks: []\n' ) + @pytest.mark.parametrize('contents', ('', '\n')) def test_empty_configuration_file_user_error(tmpdir, contents): cfg = tmpdir.join(C.CONFIG_FILE)
Update migrate_config_test.py Added second blank line between test_migrate_config_sha_to_rev and test_empty_configuration_file_user_error
diff --git a/lib/pickle/adapter.rb b/lib/pickle/adapter.rb index <HASH>..<HASH> 100644 --- a/lib/pickle/adapter.rb +++ b/lib/pickle/adapter.rb @@ -106,15 +106,29 @@ module Pickle # factory-girl adapter class FactoryGirl < Adapter def self.factories - (::Factory.factories.values rescue []).map {|factory| new(factory)} + if defined? ::FactoryGirl + factories = [] + ::FactoryGirl.factories.each {|v| factories << new(v)} + factories + else + (::Factory.factories.values rescue []).map {|factory| new(factory)} + end end def initialize(factory) - @klass, @name = factory.build_class, factory.factory_name.to_s + if defined? ::FactoryGirl + @klass, @name = factory.build_class, factory.name.to_s + else + @klass, @name = factory.build_class, factory.factory_name.to_s + end end def create(attrs = {}) - Factory(@name, attrs) + if defined? ::FactoryGirl + ::FactoryGirl.create(@name, attrs) + else + Factory(@name, attrs) + end end end
FactoryGirl <I> API is quite different. Adjust adapter to use correct behavior depending on whether new FactoryGirl API is present.
diff --git a/model/RdsResultStorage.php b/model/RdsResultStorage.php index <HASH>..<HASH> 100644 --- a/model/RdsResultStorage.php +++ b/model/RdsResultStorage.php @@ -163,7 +163,7 @@ class RdsResultStorage extends ConfigurableService ->from(self::RESULTS_TABLENAME) ->andWhere(self::RESULTS_TABLE_ID .' = :id') ->setParameter('id', $deliveryResultIdentifier); - if ($qb->execute()->fetchColumn() == 0) { + if ((int) $qb->execute()->fetchColumn() === 0) { $this->getPersistence()->insert( self::RESULTS_TABLENAME, [
Strict comparison from fetchColumn.
diff --git a/lib/podio/models/form.rb b/lib/podio/models/form.rb index <HASH>..<HASH> 100644 --- a/lib/podio/models/form.rb +++ b/lib/podio/models/form.rb @@ -18,6 +18,12 @@ class Podio::Form < ActivePodio::Base response.body['form_id'] end + def find_all_for_app(app_id) + list Podio.connection.get { |req| + req.url("/form/app/#{app_id}/") + }.body + end + def find(form_id) member Podio.connection.get("/form/#{form_id}").body end
Added find method to access all forms of a given app.
diff --git a/lib/geocoder/lookups/base.rb b/lib/geocoder/lookups/base.rb index <HASH>..<HASH> 100644 --- a/lib/geocoder/lookups/base.rb +++ b/lib/geocoder/lookups/base.rb @@ -190,7 +190,7 @@ module Geocoder else JSON.parse(data) end - rescue => err + rescue raise_error(ResponseParseError.new(data)) or Geocoder.log(:warn, "Geocoding API's response was not valid JSON: #{data}") end
"warning: assigned but unused variable - err"
diff --git a/flight/Flight.php b/flight/Flight.php index <HASH>..<HASH> 100644 --- a/flight/Flight.php +++ b/flight/Flight.php @@ -38,12 +38,10 @@ * @method static void render($file, array $data = null, $key = null) Renders a template file. * @method static flight\template\View view() Returns View instance. * - * Redirects. - * @method static void redirect($url, $code = 303) Redirects to another URL. - * * Request & Response. * @method static flight\net\Request request() Returns Request instance. * @method static flight\net\Response response() Returns Request instance. + * @method static void redirect($url, $code = 303) Redirects to another URL. * @method static void json($data, $code = 200, $encode = true) Sends a JSON response. * @method static void jsonp($data, $param = 'jsonp', $code = 200, $encode = true) Sends a JSONP response. * @method static void error($exception) Sends an HTTP 500 response.
Redirects > Request & Response
diff --git a/state/apiserver/common/addresses.go b/state/apiserver/common/addresses.go index <HASH>..<HASH> 100644 --- a/state/apiserver/common/addresses.go +++ b/state/apiserver/common/addresses.go @@ -6,8 +6,6 @@ package common import ( "launchpad.net/loggo" - "launchpad.net/juju-core/state" - "launchpad.net/juju-core/state/api" "launchpad.net/juju-core/state/api/params" )
we don't need the imports, either
diff --git a/src/Intahwebz/Jig/JigBase.php b/src/Intahwebz/Jig/JigBase.php index <HASH>..<HASH> 100644 --- a/src/Intahwebz/Jig/JigBase.php +++ b/src/Intahwebz/Jig/JigBase.php @@ -24,10 +24,16 @@ abstract class JigBase { function __construct(ViewModel $viewModel, $jigRender){ $this->viewModel = $viewModel; $this->jigRender = $jigRender; + $this->init(); } abstract function renderInternal(); + function init() { + //Override stuff. + } + + /** * @param $view */ diff --git a/src/Intahwebz/Jig/JigRender.php b/src/Intahwebz/Jig/JigRender.php index <HASH>..<HASH> 100644 --- a/src/Intahwebz/Jig/JigRender.php +++ b/src/Intahwebz/Jig/JigRender.php @@ -226,8 +226,6 @@ class JigRender { $className = $this->jigConverter->getNamespacedClassNameFromFileName($templateFilename, $proxied); - - //If not cached if ($this->compileCheck == JigRender::COMPILE_CHECK_EXISTS) { if (class_exists($className) == true) {
Added init function to allow overriding.
diff --git a/WordPress/Sniffs/VIP/ValidatedSanitizedInputSniff.php b/WordPress/Sniffs/VIP/ValidatedSanitizedInputSniff.php index <HASH>..<HASH> 100644 --- a/WordPress/Sniffs/VIP/ValidatedSanitizedInputSniff.php +++ b/WordPress/Sniffs/VIP/ValidatedSanitizedInputSniff.php @@ -91,9 +91,7 @@ class WordPress_Sniffs_VIP_ValidatedSanitizedInputSniff extends WordPress_Sniff // Handling string interpolation if ( T_DOUBLE_QUOTED_STRING === $tokens[ $stackPtr ]['code'] ) { $interpolated_variables = array_map( - function ( $symbol ) { - return '$' . $symbol; - }, + create_function( '$symbol', 'return "$" . $symbol;' ), // Replace with closure when 5.3 is minimum requirement for PHPCS. $this->get_interpolated_variables( $tokens[ $stackPtr ]['content'] ) ); foreach ( array_intersect( $interpolated_variables, $superglobals ) as $bad_variable ) {
Replace closure with create_function() for <I> support
diff --git a/mappings/document.js b/mappings/document.js index <HASH>..<HASH> 100644 --- a/mappings/document.js +++ b/mappings/document.js @@ -186,9 +186,6 @@ var schema = { _source: { excludes : ['shape','phrase'] }, - _all: { - enabled: false - }, dynamic: 'strict' }; diff --git a/test/document.js b/test/document.js index <HASH>..<HASH> 100644 --- a/test/document.js +++ b/test/document.js @@ -185,7 +185,7 @@ module.exports.tests.dynamic_templates = function(test, common) { // _all should be disabled module.exports.tests.all_disabled = function(test, common) { test('_all disabled', function(t) { - t.equal(schema._all.enabled, false, '_all disabled'); + t.false(schema._all, '_all undefined'); t.end(); }); }; diff --git a/test/fixtures/expected.json b/test/fixtures/expected.json index <HASH>..<HASH> 100644 --- a/test/fixtures/expected.json +++ b/test/fixtures/expected.json @@ -1149,9 +1149,6 @@ "phrase" ] }, - "_all": { - "enabled": false - }, "dynamic": "strict" } }
feat(es7): remove _all mapping The `_all` field was deprecated in Elasticsearch 6 and completely removed in [Elasticsearch 7](<URL>
diff --git a/workflows/frontend/__init__.py b/workflows/frontend/__init__.py index <HASH>..<HASH> 100644 --- a/workflows/frontend/__init__.py +++ b/workflows/frontend/__init__.py @@ -231,7 +231,11 @@ class Frontend(): if self._pipe_commands: self._pipe_commands.send(command) else: - self.log.error('No command queue pipe found for command\n%s', str(command)) + if self.shutdown: + # Stop delivering messages in shutdown. + self.log.info('During shutdown no command queue pipe found for command\n%s', str(command)) + else: + self.log.error('No command queue pipe found for command\n%s', str(command)) def process_transport_command(self, header, message): '''Parse a command coming in through the transport command subscription'''
Ignore errors occurring during message forward due to closed connection when service is in shutdown
diff --git a/cmd/swarm/config.go b/cmd/swarm/config.go index <HASH>..<HASH> 100644 --- a/cmd/swarm/config.go +++ b/cmd/swarm/config.go @@ -38,7 +38,7 @@ import ( bzzapi "github.com/ethereum/go-ethereum/swarm/api" ) -const SWARM_VERSION = "0.3" +const SWARM_VERSION = "0.3.1-unstable" var ( //flag definition for the dumpconfig command
cmd/swarm: change version of swarm binary (#<I>)
diff --git a/lib/core/staticFile.js b/lib/core/staticFile.js index <HASH>..<HASH> 100644 --- a/lib/core/staticFile.js +++ b/lib/core/staticFile.js @@ -1,8 +1,5 @@ -var mime = require('mime'); - // TODO: support Range requests - module.exports = function handle_staticFile() { if (this.allowMethod(['GET', 'HEAD'])) return;
[cleanup] mime require in staticFile
diff --git a/includes/os/class.WINNT.inc.php b/includes/os/class.WINNT.inc.php index <HASH>..<HASH> 100644 --- a/includes/os/class.WINNT.inc.php +++ b/includes/os/class.WINNT.inc.php @@ -1345,15 +1345,15 @@ class WINNT extends OS $this->_loadavg(); $this->_processes(); } - if (!$this->blockname || $this->blockname==='network') { - $this->_network(); - } if (!$this->blockname || $this->blockname==='hardware') { $this->_machine(); $this->_cpuinfo(); $this->_meminfo(); $this->_hardware(); } + if (!$this->blockname || $this->blockname==='network') { + $this->_network(); + } if (!$this->blockname || $this->blockname==='filesystem') { $this->_filesystems(); }
Update class.WINNT.inc.php
diff --git a/capidup/tests/test_round_up.py b/capidup/tests/test_round_up.py index <HASH>..<HASH> 100644 --- a/capidup/tests/test_round_up.py +++ b/capidup/tests/test_round_up.py @@ -42,21 +42,16 @@ known_values = [ # list of (n, n, n) tuples, with length RANDOM_REPEATS _random_same = [ - (_n, _n, _n) - for _n in - map(lambda _: random.randrange(0, MAX_RANDOM_NUM), - range(RANDOM_REPEATS)) + (random.randrange(0, MAX_RANDOM_NUM),) * 3 + for _ in range(RANDOM_REPEATS) ] # list of (n, m) tuples, with length RANDOM_REPEATS, where # n >= 0 and m >= 1 _random_n_mult = [ - (n, mult) - for n, mult in - map(lambda _: (random.randrange(0, MAX_RANDOM_NUM), - random.randrange(1, MAX_RANDOM_NUM)), - range(RANDOM_REPEATS)) + (random.randrange(0, MAX_RANDOM_NUM), random.randrange(1, MAX_RANDOM_NUM)) + for _ in range(RANDOM_REPEATS) ]
Simplify test data generation in test_round_up.
diff --git a/hazelcast-client/src/test/java/com/hazelcast/client/ClientMemberAttributeTest.java b/hazelcast-client/src/test/java/com/hazelcast/client/ClientMemberAttributeTest.java index <HASH>..<HASH> 100644 --- a/hazelcast-client/src/test/java/com/hazelcast/client/ClientMemberAttributeTest.java +++ b/hazelcast-client/src/test/java/com/hazelcast/client/ClientMemberAttributeTest.java @@ -48,7 +48,7 @@ public class ClientMemberAttributeTest extends HazelcastTestSupport { @Test(timeout = 40000) public void testChangeMemberAttributes() throws Exception { - final int count = 1000; + final int count = 100; final HazelcastInstance instance = Hazelcast.newHazelcastInstance(); final ClientConfig config = new ClientConfig();
Lowered count to make it finish in time
diff --git a/klein.php b/klein.php index <HASH>..<HASH> 100644 --- a/klein.php +++ b/klein.php @@ -108,7 +108,7 @@ function dispatch($uri = null, $req_method = null, array $params = null, $captur } $matched = 0; - $methods_matched = null; + $methods_matched = array(); $apc = function_exists('apc_fetch'); ob_start(); @@ -205,7 +205,8 @@ function dispatch($uri = null, $req_method = null, array $params = null, $captur if (isset($match) && $match ^ $negate) { // Keep track of possibly matched methods - $methods_matched = array_merge( (array) $methods_matched, (array) $method ); + $methods_matched[] = $method; + $methods_matched = array_filter( $methods_matched ); $methods_matched = array_unique( $methods_matched ); if ( $possible_match ) {
Now using more efficient array operations for "methods_matched"
diff --git a/spec/grape/api_spec.rb b/spec/grape/api_spec.rb index <HASH>..<HASH> 100644 --- a/spec/grape/api_spec.rb +++ b/spec/grape/api_spec.rb @@ -579,6 +579,31 @@ describe Grape::API do last_response.body.should eql 'first second' end + it 'adds a before filter to current and child namespaces only' do + subject.get '/' do + "root - #{@foo}" + end + subject.namespace :blah do + before { @foo = 'foo' } + get '/' do + "blah - #{@foo}" + end + + namespace :bar do + get '/' do + "blah - bar - #{@foo}" + end + end + end + + get '/' + last_response.body.should eql 'root - ' + get '/blah' + last_response.body.should eql 'blah - foo' + get '/blah/bar' + last_response.body.should eql 'blah - bar - foo' + end + it 'adds a after_validation filter' do subject.after_validation { @foo = "first #{params[:id] }:#{params[:id].class}" } subject.after_validation { @bar = 'second' }
Test to confirm behaviour of before in namespace
diff --git a/internal/protocol/packet_number_test.go b/internal/protocol/packet_number_test.go index <HASH>..<HASH> 100644 --- a/internal/protocol/packet_number_test.go +++ b/internal/protocol/packet_number_test.go @@ -10,8 +10,8 @@ import ( // Tests taken and extended from chrome var _ = Describe("packet number calculation", func() { - PIt("works with the example from the draft", func() { - Expect(InferPacketNumber(PacketNumberLen2, 0xa82f30ea, 0x9b32)).To(Equal(PacketNumber(0xa8309b32))) + It("works with the example from the draft", func() { + Expect(InferPacketNumber(PacketNumberLen2, 0xa82f30ea, 0x9b32)).To(Equal(PacketNumber(0xa82f9b32))) }) getEpoch := func(len PacketNumberLen) uint64 {
enable packet number encoding test case taken from the draft
diff --git a/rapidoid-commons/src/main/java/org/rapidoid/scan/ClasspathUtil.java b/rapidoid-commons/src/main/java/org/rapidoid/scan/ClasspathUtil.java index <HASH>..<HASH> 100644 --- a/rapidoid-commons/src/main/java/org/rapidoid/scan/ClasspathUtil.java +++ b/rapidoid-commons/src/main/java/org/rapidoid/scan/ClasspathUtil.java @@ -128,16 +128,18 @@ public class ClasspathUtil extends RapidoidThing { } AtomicInteger searched = new AtomicInteger(); - List<String> classes = U.list(); + Set<String> classes = U.set(); for (String pkg : pkgs) { classes.addAll(retrieveClasses(pkg, params.annotated(), pattern, params.classLoader(), searched)); } + List<String> classList = U.list(classes); + long timeMs = U.time() - startingAt; - Log.info("Finished classpath scan", "time", timeMs + "ms", "searched", searched.get(), "!found", Msc.classNames(classes)); + Log.info("Finished classpath scan", "time", timeMs + "ms", "searched", searched.get(), "!found", Msc.classNames(classList)); - return classes; + return classList; } private static List<String> retrieveClasses(String packageName, Class<? extends Annotation>[] annotated,
Preventing duplicates on classpath scan.
diff --git a/niworkflows/tests/test_confounds.py b/niworkflows/tests/test_confounds.py index <HASH>..<HASH> 100644 --- a/niworkflows/tests/test_confounds.py +++ b/niworkflows/tests/test_confounds.py @@ -160,6 +160,15 @@ def test_ConfoundsCorrelationPlot(): """confounds correlation report test""" confounds_file = os.path.join(datadir, "confounds_test.tsv") cc_rpt = ConfoundsCorrelationPlot( - confounds_file=confounds_file, reference_column="a" + confounds_file=confounds_file, reference_column="a", ) _smoke_test_report(cc_rpt, "confounds_correlation.svg") + + +def test_ConfoundsCorrelationPlotColumns(): + """confounds correlation report test""" + confounds_file = os.path.join(datadir, "confounds_test.tsv") + cc_rpt = ConfoundsCorrelationPlot( + confounds_file=confounds_file, reference_column="a", columns=["b", "d", "f"], + ) + _smoke_test_report(cc_rpt, "confounds_correlation_cols.svg")
enh(tests): improve coverage
diff --git a/curse.go b/curse.go index <HASH>..<HASH> 100644 --- a/curse.go +++ b/curse.go @@ -19,6 +19,8 @@ type Cursor struct { Position StartingPosition Position Style + + terminal *term.Terminal } type Position struct { @@ -38,7 +40,8 @@ func New() (*Cursor, error) { c := &Cursor{} c.Position.X, c.StartingPosition.X = col, col c.Position.Y, c.StartingPosition.Y = line, line - return c, nil + c.terminal, err = term.New() + return c, err } func (c *Cursor) MoveUp(nLines int) *Cursor { @@ -126,6 +129,18 @@ func (c *Cursor) SetDefaultStyle() *Cursor { return c } +func (c *Cursor) ModeRaw() *Cursor { + _ = c.terminal.RawMode() + + return c +} + +func (c *Cursor) ModeRestore() *Cursor { + _ = c.terminal.Restore() + + return c +} + // using named returns to help when using the method to know what is what func GetScreenDimensions() (cols int, lines int, err error) { // todo: use kless/term to listen in on screen size changes
patch to fix raw mode issues by borrowing code from kless terminal
diff --git a/src/pythonfinder/__init__.py b/src/pythonfinder/__init__.py index <HASH>..<HASH> 100644 --- a/src/pythonfinder/__init__.py +++ b/src/pythonfinder/__init__.py @@ -1,6 +1,6 @@ from __future__ import print_function, absolute_import -__version__ = '1.1.9' +__version__ = '1.1.10.dev0' # Add NullHandler to "pythonfinder" logger, because Python2's default root # logger has no handler and warnings like this would be reported:
Prebump to <I>.dev0
diff --git a/src/httpAdapters/SagCURLHTTPAdapter.php b/src/httpAdapters/SagCURLHTTPAdapter.php index <HASH>..<HASH> 100644 --- a/src/httpAdapters/SagCURLHTTPAdapter.php +++ b/src/httpAdapters/SagCURLHTTPAdapter.php @@ -93,18 +93,7 @@ class SagCURLHTTPAdapter extends SagHTTPAdapter { $response->body = ''; // split headers and body - list($continue, $headers, $response->body) = explode("\r\n\r\n", $chResponse); - - /* - * It doesn't always happen, but it seems that we will sometimes get a - * Continue header that will screw parsing up. - */ - if(!$response->body) { - $response->body = $headers; - $headers = $continue; - } - - unset($continue); + list($headers, $response->body) = explode("\r\n\r\n", $chResponse); // split up the headers $headers = explode("\r\n", $headers);
Removing old and broken Continue header handling code now that we prevent them.
diff --git a/plugin.js b/plugin.js index <HASH>..<HASH> 100644 --- a/plugin.js +++ b/plugin.js @@ -40,6 +40,7 @@ const globals = new Set([ 'requestAnimationFrame', '_WORKLET', 'arguments', + 'Boolean', 'Map', 'Set', '_log',
Update plugin.js (#<I>)
diff --git a/sslyze/plugins/session_renegotiation_plugin.py b/sslyze/plugins/session_renegotiation_plugin.py index <HASH>..<HASH> 100755 --- a/sslyze/plugins/session_renegotiation_plugin.py +++ b/sslyze/plugins/session_renegotiation_plugin.py @@ -152,12 +152,12 @@ def _test_client_renegotiation( except socket.timeout: # This is how Netty rejects a renegotiation - https://github.com/nabla-c0d3/sslyze/issues/114 accepts_client_renegotiation = False - except socket.error as e: - if "connection was forcibly closed" in str(e.args): - accepts_client_renegotiation = False - elif "reset by peer" in str(e.args): - accepts_client_renegotiation = False - elif "Nassl SSL handshake failed" in str(e.args): + except ConnectionError: + accepts_client_renegotiation = False + except OSError as e: + # OSError is the parent of all (non-TLS) socket/connection errors so it should be last + if "Nassl SSL handshake failed" in e.args[0]: + # Special error returned by nassl accepts_client_renegotiation = False else: raise
[#<I>] Make error handling language agnostic for reneg
diff --git a/src/store/modules/navigation.js b/src/store/modules/navigation.js index <HASH>..<HASH> 100644 --- a/src/store/modules/navigation.js +++ b/src/store/modules/navigation.js @@ -19,9 +19,14 @@ function transformViewName (view) { } function newIDGen (view, viewPosition) { let ID = '' - if (viewPosition === 'previous') store.state.cache[store.state.cache.length - 1].id.split('--') - if (viewPosition === 'past') store.state.cache[store.state.cache.length - 2].id.split('--') - if (viewPosition === 'last') store.state.cache[store.state.cache.length - 3].id.split('--') + if (viewPosition === 'previous') { + var index = 1 + } else if (viewPosition === 'past') { + index = 2 + } else { + index = 3 + } + store.state.cache[store.state.cache.length - index].id.split('--') view === viewPosition[0] ? ID = view + '--' + (Number(viewPosition[1]) + 1) : ID = view + '--0' return ID }
Simplify code for TransformViewName
diff --git a/aws/awserr/types.go b/aws/awserr/types.go index <HASH>..<HASH> 100644 --- a/aws/awserr/types.go +++ b/aws/awserr/types.go @@ -94,7 +94,9 @@ func (b baseError) OrigErr() error { // Pushes a new error to the stack func (b *baseError) Append(err error) { - b.errs = append(b.errs, err) + if err != nil { + b.errs = append(b.errs, err) + } } // So that the Error interface type can be included as an anonymous field
Append shouldn't push to the stack for errors
diff --git a/bbc_tracklist.py b/bbc_tracklist.py index <HASH>..<HASH> 100755 --- a/bbc_tracklist.py +++ b/bbc_tracklist.py @@ -159,13 +159,13 @@ def get_output_filename(args): Returns a filename without an extension. """ # if filename and path provided, use these for output text file - if args.directory is not None and args.filename is not None: + if args.directory is not None and args.fileprefix is not None: path = args.directory - filename = args.filename + filename = args.fileprefix output = os.path.join(path, filename) # otherwise set output to current path - elif args.filename is not None: - output = args.filename + elif args.fileprefix is not None: + output = args.fileprefix else: output = args.pid return output
Change 'filename' to 'fileprefix' to be clearer about what is required; updated main script accordingly.
diff --git a/lib/generators/my_zipcode_gem/templates/zipcode_model.rb b/lib/generators/my_zipcode_gem/templates/zipcode_model.rb index <HASH>..<HASH> 100644 --- a/lib/generators/my_zipcode_gem/templates/zipcode_model.rb +++ b/lib/generators/my_zipcode_gem/templates/zipcode_model.rb @@ -13,6 +13,7 @@ class Zipcode < ActiveRecord::Base def find_by_city_state(city, state) includes(county: :state) .where("city like ? AND states.abbr like ?", "#{city}%", "%#{state}%") + .references(:state) .first end end
fix(zipcode): Fix zipcode in Rails 4+ Close #<I>
diff --git a/shamir/shamir.go b/shamir/shamir.go index <HASH>..<HASH> 100644 --- a/shamir/shamir.go +++ b/shamir/shamir.go @@ -29,13 +29,11 @@ func makePolynomial(intercept, degree uint8) (polynomial, error) { // Ensure the intercept is set p.coefficients[0] = intercept - // Assign random co-efficients to the polynomial, ensuring - // the highest order co-efficient is non-zero - for p.coefficients[degree] == 0 { - if _, err := rand.Read(p.coefficients[1:]); err != nil { - return p, err - } + // Assign random co-efficients to the polynomial + if _, err := rand.Read(p.coefficients[1:]); err != nil { + return p, err } + return p, nil }
Don't exclude 0 from the set of valid polynomials in Shamir. This leads to a potential (although extremely trivial) amount of information leakage.
diff --git a/discord/http.py b/discord/http.py index <HASH>..<HASH> 100644 --- a/discord/http.py +++ b/discord/http.py @@ -409,7 +409,7 @@ class HTTPClient: return self.request(route, form=form, files=files) - def send_file( + def send_files( self, channel_id, *,
Fix AttributeError on HTTPClient.send_file to be send_files
diff --git a/structr-ui/src/test/java/org/structr/web/frontend/selenium/ParallelLoginTest.java b/structr-ui/src/test/java/org/structr/web/frontend/selenium/ParallelLoginTest.java index <HASH>..<HASH> 100644 --- a/structr-ui/src/test/java/org/structr/web/frontend/selenium/ParallelLoginTest.java +++ b/structr-ui/src/test/java/org/structr/web/frontend/selenium/ParallelLoginTest.java @@ -77,8 +77,8 @@ public class ParallelLoginTest extends SeleniumTest { WebDriver driver = new ChromeDriver(chromeOptions); try { - // Wait 60 s for successful login - loginAsAdmin(menuEntry, driver, 60); + // Wait 10 min for successful login + loginAsAdmin(menuEntry, driver, 600); } catch (Exception ex) { logger.error("Error in nested test in thread " + Thread.currentThread().toString(), ex); return ex;
Increased timeout to wait for successful login to rule out the possibility of a resource bottleneck in parallel test.
diff --git a/commands/command.go b/commands/command.go index <HASH>..<HASH> 100644 --- a/commands/command.go +++ b/commands/command.go @@ -21,6 +21,7 @@ func (c *Command) Register(id string, sub *Command) error { // check for duplicate option names (only checks downwards) names := make(map[string]bool) + globalCommand.checkOptions(names) c.checkOptions(names) err := sub.checkOptions(names) if err != nil { @@ -39,6 +40,7 @@ func (c *Command) Register(id string, sub *Command) error { func (c *Command) Call(path []string, req *Request) (interface{}, error) { options := make([]Option, len(c.Options)) copy(options, c.Options) + options = append(options, globalOptions...) cmd := c if path != nil {
commands: Use global options when registering and calling commands
diff --git a/classes/PodsAPI.php b/classes/PodsAPI.php index <HASH>..<HASH> 100644 --- a/classes/PodsAPI.php +++ b/classes/PodsAPI.php @@ -3412,7 +3412,7 @@ class PodsAPI { foreach ( $values as $v ) { if ( !empty( $v ) ) { if ( !is_array( $v ) ) { - if ( !preg_match( '/[^0-9]*/', $v ) ) { + if ( !preg_match( '/[^0-9]/', $v ) ) { $v = (int) $v; } // File handling
Quick hotfix for search data lookup
diff --git a/gocron.go b/gocron.go index <HASH>..<HASH> 100644 --- a/gocron.go +++ b/gocron.go @@ -320,7 +320,7 @@ func (s *Scheduler) Swap(i, j int) { } func (s *Scheduler) Less(i, j int) bool { - return s.jobs[j].nextRun.After(s.jobs[i].nextRun) + return s.jobs[j].nextRun.Second() >= s.jobs[i].nextRun.Second() } // NewScheduler creates a new scheduler @@ -335,9 +335,7 @@ func (s *Scheduler) getRunnableJobs() (running_jobs [MAXJOBNUM]*Job, n int) { sort.Sort(s) for i := 0; i < s.size; i++ { if s.jobs[i].shouldRun() { - runnableJobs[n] = s.jobs[i] - //fmt.Println(runnableJobs) n++ } else { break
This alone fixes #<I>. Now we compare only seconds instead of relying on the default time comparison method, which compares up to nanoseconds
diff --git a/mapping/mapping_test.go b/mapping/mapping_test.go index <HASH>..<HASH> 100644 --- a/mapping/mapping_test.go +++ b/mapping/mapping_test.go @@ -1192,6 +1192,7 @@ func TestMappingArrayOfStringGeoPoints(t *testing.T) { "points": []string { "1.0, 2.0", "3.0, 4.0", + "5.0, 6.0", }, } @@ -1205,6 +1206,7 @@ func TestMappingArrayOfStringGeoPoints(t *testing.T) { expectPoints := map[string][]float64{ "first": {2.0, 1.0}, "second": {4.0, 3.0}, + "third": {6.0, 5.0}, } for _, f := range doc.Fields { @@ -1237,4 +1239,4 @@ func TestMappingArrayOfStringGeoPoints(t *testing.T) { t.Errorf("some points not found: %v", expectPoints) } -} \ No newline at end of file +}
add third point to test removes any possible confusion around slice len 2 checks in the geo parsing code
diff --git a/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java b/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java +++ b/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java @@ -41,18 +41,6 @@ public interface Deployment extends Extensible ClassLoader getClassLoader(); /** - * Get the deployment type - * @return deployment type - */ - DeploymentType getType(); - - /** - * Set the deployment type - * @param type deployment type - */ - void setType(DeploymentType type); - - /** * Get the service associated with this deployment * @return service for the deployment */
[JBWS-<I>] removed unintended methods
diff --git a/dronekit/__init__.py b/dronekit/__init__.py index <HASH>..<HASH> 100644 --- a/dronekit/__init__.py +++ b/dronekit/__init__.py @@ -3009,7 +3009,7 @@ class CommandSequence(object): self._vehicle._wploader.add(cmd, comment='Added by DroneKit') self._vehicle._wpts_dirty = True - def upload(self): + def upload(self, timeout=None): """ Call ``upload()`` after :py:func:`adding <CommandSequence.add>` or :py:func:`clearing <CommandSequence.clear>` mission commands. @@ -3018,10 +3018,13 @@ class CommandSequence(object): """ if self._vehicle._wpts_dirty: self._vehicle._master.waypoint_clear_all_send() + start_time = time.time() if self._vehicle._wploader.count() > 0: self._vehicle._wp_uploaded = [False] * self._vehicle._wploader.count() self._vehicle._master.waypoint_count_send(self._vehicle._wploader.count()) while False in self._vehicle._wp_uploaded: + if timeout and time.time() - start_time > timeout: + raise TimeoutError time.sleep(0.1) self._vehicle._wp_uploaded = None self._vehicle._wpts_dirty = False
Set a timeout for uploading missions
diff --git a/bin/index.js b/bin/index.js index <HASH>..<HASH> 100644 --- a/bin/index.js +++ b/bin/index.js @@ -8,7 +8,7 @@ function printErrors(errorObj) { for(let m of errorObj.message) { content += m; } - console.log(content); + console.error(content); fs.writeFileSync(cli.errorLogFile, content); } @@ -68,7 +68,8 @@ const html = ltd.toHtml( if(typeof html !== "string") { printErrors(html); - return; + return 1; } -fs.writeFileSync(cli.documentFile, html); \ No newline at end of file +fs.writeFileSync(cli.documentFile, html); +return 0; \ No newline at end of file
- correct exit status and error logging for cli
diff --git a/openquake/commonlib/rlzs_assoc.py b/openquake/commonlib/rlzs_assoc.py index <HASH>..<HASH> 100644 --- a/openquake/commonlib/rlzs_assoc.py +++ b/openquake/commonlib/rlzs_assoc.py @@ -115,9 +115,9 @@ class RlzsAssoc(object): else: # dictionary for the selected source model for rlz in self.rlzs_by_smodel[sm_id]: gsim_by_trt = self.gsim_by_trt[rlz.ordinal] - try: # if there is a single TRT + if trt == '*': # for scenario with 1 gsim [gsim] = gsim_by_trt.values() - except ValueError: # there is more than 1 TRT + else: gsim = gsim_by_trt[trt] acc[gsim].append(rlz.ordinal) # EventBasedTestCase::test_case_10 is a case with num_rlzs=[25, 36, 39]
Retried simplifying get_rlzs_by_gsim
diff --git a/src/ox_modules/module-web/commands/makeVisible.js b/src/ox_modules/module-web/commands/makeVisible.js index <HASH>..<HASH> 100644 --- a/src/ox_modules/module-web/commands/makeVisible.js +++ b/src/ox_modules/module-web/commands/makeVisible.js @@ -50,10 +50,10 @@ module.exports = async function (locator) { if (opacity === '0') { curElm.style.cssText += ';opacity:1 !important;'; } - if (height === '0') { + if (height === '0' || height === '0px') { curElm.style.cssText += ';height:1px !important;'; } - if (width === '0') { + if (width === '0' || width === '0px') { curElm.style.cssText += ';width:1px !important;'; } curElm = curElm.parentElement;
Fix setting width and height in web.makeVIsible
diff --git a/src/templates/valuelists/form.php b/src/templates/valuelists/form.php index <HASH>..<HASH> 100644 --- a/src/templates/valuelists/form.php +++ b/src/templates/valuelists/form.php @@ -20,8 +20,8 @@ <? if (isset($valuelist)) : ?> <? foreach ($valuelist->pairs as $key => $value) : ?> <li class="form-element parameters"> - <input type="text" required="required" name="keys[]" placeholder="Key" value="<?= $key ?>"/>&nbsp; - <input type="text" required="required" name="values[]" placeholder="Value" value="<?= $value ?>"/> + <input type="text" required="required" name="keys[]" placeholder="Key" value="<?= htmlentities($key) ?>"/>&nbsp; + <input type="text" required="required" name="values[]" placeholder="Value" value="<?= htmlentities($value) ?>"/> <a class="btn error" id="sitemap_remove_parameter"><i class="fa fa-trash"></i></a> </li> <? endforeach ?>
Added escaping for valulist entries
diff --git a/slumber/__init__.py b/slumber/__init__.py index <HASH>..<HASH> 100644 --- a/slumber/__init__.py +++ b/slumber/__init__.py @@ -109,10 +109,12 @@ class Resource(ResourceAttributesMixin, object): resp = self._request("GET", params=kwargs) if 200 <= resp.status_code <= 299: - if resp.status_code == 200: - return s.loads(resp.content) - else: + try: + stype = s.get_serializer(content_type=resp.headers.get("content-type")) + except exceptions.SerializerNotAvailable: return resp.content + + return stype.loads(resp.content) else: return # @@@ We should probably do some sort of error here? (Is this even possible?)
Don't assume on the format of the serialized, use content_type
diff --git a/lems/model/model.py b/lems/model/model.py index <HASH>..<HASH> 100644 --- a/lems/model/model.py +++ b/lems/model/model.py @@ -247,7 +247,8 @@ class Model(LEMSBase): else: if self.debug: print("Already included: %s"%path) return - raise Exception('Unable to open ' + path) + if self.debug: print('Unable to open' + path) + #raise Exception('Unable to open ' + path) def import_from_file(self, filepath): """
Turn Exception into debug message to give user option to ignore irrelevant includes
diff --git a/lib/hash/tree_hash.rb b/lib/hash/tree_hash.rb index <HASH>..<HASH> 100644 --- a/lib/hash/tree_hash.rb +++ b/lib/hash/tree_hash.rb @@ -157,7 +157,9 @@ class TreeHash def move(paths) paths.each do |from, to| - value = find(from).first + values = find(from) + next if values.empty? + value = values.first bridge(to => value) value.kill if value end
Modified move to only create the to path if the from actually existed.
diff --git a/QuickPay/api/Request.php b/QuickPay/api/Request.php index <HASH>..<HASH> 100644 --- a/QuickPay/api/Request.php +++ b/QuickPay/api/Request.php @@ -157,7 +157,7 @@ class Request // If additional data is delivered, we will send it along with the API request if( is_array( $form ) && ! empty( $form ) ) { - curl_setopt( $this->client->ch, CURLOPT_POSTFIELDS, $form ); + curl_setopt( $this->client->ch, CURLOPT_POSTFIELDS, http_build_query($form) ); } // Execute the request
Support for parameters of type object - eg POST /payments with variables. Example: $form = [ 'currency' => 'DKK', 'order_id' => '<I>-1', 'variables' => [ 'foo' => 'bar', 'more' => 'less' ] ]; $response = $client->request->post('/payments', $form);
diff --git a/CodeIgniter4/Sniffs/Files/FilenameMatchesClassSniff.php b/CodeIgniter4/Sniffs/Files/FilenameMatchesClassSniff.php index <HASH>..<HASH> 100644 --- a/CodeIgniter4/Sniffs/Files/FilenameMatchesClassSniff.php +++ b/CodeIgniter4/Sniffs/Files/FilenameMatchesClassSniff.php @@ -69,12 +69,11 @@ class FilenameMatchesClassSniff implements Sniff return; } - $className = trim($phpcsFile->getDeclarationName($stackPtr)); - + $className = trim($phpcsFile->getDeclarationName($stackPtr)); $nextContentPtr = $phpcsFile->findNext(T_WHITESPACE, ($stackPtr + 1), null, true); + $type = $tokens[$stackPtr]['content']; if ($fileName !== $className.'.php' && $this->badFilename === false) { - $type = $tokens[$stackPtr]['content']; $data = array( $fileName, $className.'.php',
Fixed issue with unreachable $type variable.
diff --git a/lib/cool.io/listener.rb b/lib/cool.io/listener.rb index <HASH>..<HASH> 100644 --- a/lib/cool.io/listener.rb +++ b/lib/cool.io/listener.rb @@ -59,6 +59,9 @@ module Coolio else def on_readable begin + # In Windows, accept_nonblock() with multiple processes + # causes thundering herd problem. + # To avoid this, we need to use accept(). on_connection @listen_socket.accept rescue Errno::EAGAIN, Errno::ECONNABORTED end
Add comment for why to use accept in Windows
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb index <HASH>..<HASH> 100644 --- a/lib/sup/crypto.rb +++ b/lib/sup/crypto.rb @@ -108,6 +108,9 @@ EOS else Chunk::CryptoNotice.new :invalid, $1, output_lines end + elsif output_lines.length == 0 && rc == 0 + # the message wasn't signed + Chunk::CryptoNotice.new :valid, "Encrypted message wasn't signed", output_lines else unknown_status output_lines end
Stop worrying notice when no signature present When no signature is present, there was a message saying "Unable to determine validity of cryptographic signature". This fix means that if there are no error messages and no messages about signature verification then the message is assumed to not be signed at all. This fix also saves the encrypted messages to a temp file with a suffix of .asc to stop gpg complaining about "unknown suffix".
diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/azurearm.py +++ b/salt/cloud/clouds/azurearm.py @@ -68,7 +68,6 @@ import salt.utils.data import salt.utils.files import salt.utils.stringutils import salt.utils.yaml -from salt.utils.versions import LooseVersion from salt.ext import six import salt.version from salt.exceptions import (
remove unused import from azurearm driver
diff --git a/cmd/kubeadm/app/features/features.go b/cmd/kubeadm/app/features/features.go index <HASH>..<HASH> 100644 --- a/cmd/kubeadm/app/features/features.go +++ b/cmd/kubeadm/app/features/features.go @@ -32,12 +32,15 @@ const ( IPv6DualStack = "IPv6DualStack" // PublicKeysECDSA is expected to be alpha in v1.19 PublicKeysECDSA = "PublicKeysECDSA" + // RootlessControlPlane is expected to be in alpha in v1.22 + RootlessControlPlane = "RootlessControlPlane" ) // InitFeatureGates are the default feature gates for the init command var InitFeatureGates = FeatureList{ - IPv6DualStack: {FeatureSpec: featuregate.FeatureSpec{Default: true, PreRelease: featuregate.Beta}}, - PublicKeysECDSA: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}}, + IPv6DualStack: {FeatureSpec: featuregate.FeatureSpec{Default: true, PreRelease: featuregate.Beta}}, + PublicKeysECDSA: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}}, + RootlessControlPlane: {FeatureSpec: featuregate.FeatureSpec{Default: false, PreRelease: featuregate.Alpha}}, } // Feature represents a feature being gated
Add a feature-gate to kubeadm to enable/disable Rootless control-plane.
diff --git a/honeybadger.go b/honeybadger.go index <HASH>..<HASH> 100644 --- a/honeybadger.go +++ b/honeybadger.go @@ -163,7 +163,7 @@ func NewReportWithSkipCallers(msg interface{}, skipCallers int) (r *Report, err r = &Report{ Notifier: &Notifier{ Name: "Honeybadger (Go)", - Url: "https://github.com/jcoene/honeybadger-go", + Url: "https://github.com/librato/honeybadger-go", Version: "1.0", Language: "Go", },
Change notifier Url to point to Librato's fork
diff --git a/buckets.go b/buckets.go index <HASH>..<HASH> 100644 --- a/buckets.go +++ b/buckets.go @@ -8,7 +8,7 @@ import ( "github.com/boltdb/bolt" ) -// A buckets DB is a set of buckets. +// A DB is a bolt database with convenience methods for working with buckets. // // A DB embeds the exposed bolt.DB methods. type DB struct { diff --git a/rangescan.go b/rangescan.go index <HASH>..<HASH> 100644 --- a/rangescan.go +++ b/rangescan.go @@ -36,7 +36,6 @@ func (rs *RangeScanner) Count() (count int, err error) { return count, err } -// Values returns a slice of values for keys within the range. // Keys returns a slice of keys within the range. func (rs *RangeScanner) Keys() (keys [][]byte, err error) { err = rs.db.View(func(tx *bolt.Tx) error {
Edit code comments to make linter happy
diff --git a/src/Writer.php b/src/Writer.php index <HASH>..<HASH> 100644 --- a/src/Writer.php +++ b/src/Writer.php @@ -158,6 +158,7 @@ class Writer $writer->setDelimiter($this->delimiter); $writer->setEnclosure($this->enclosure); $writer->setLineEnding($this->lineEnding); + $writer->setUseBOM($this->useBom); $writer->setIncludeSeparatorLine($this->includeSeparatorLine); $writer->setExcelCompatibility($this->excelCompatibility); }
Fix csv.use_bom option doesn't take effect (#<I>)
diff --git a/lime/tests/test_scikit_image.py b/lime/tests/test_scikit_image.py index <HASH>..<HASH> 100755 --- a/lime/tests/test_scikit_image.py +++ b/lime/tests/test_scikit_image.py @@ -2,7 +2,7 @@ import unittest from lime.wrappers.scikit_image import BaseWrapper from lime.wrappers.scikit_image import SegmentationAlgorithm from skimage.segmentation import quickshift -from skimage.data import astronaut +from skimage.data import chelsea from skimage.util import img_as_float import numpy as np @@ -105,7 +105,7 @@ class TestBaseWrapper(unittest.TestCase): class TestSegmentationAlgorithm(unittest.TestCase): def test_instanciate_segmentation_algorithm(self): - img = img_as_float(astronaut()[::2, ::2]) + img = img_as_float(chelsea()[::2, ::2]) # wrapped functions provide the same result fn = SegmentationAlgorithm('quickshift', kernel_size=3, max_dist=6,
changing image in test, trying to fix travis
diff --git a/lib/checkSystem.js b/lib/checkSystem.js index <HASH>..<HASH> 100644 --- a/lib/checkSystem.js +++ b/lib/checkSystem.js @@ -6,9 +6,11 @@ let check = function(pathToPackage) { const exec = require('child_process').exec; const Promise = require('bluebird'); const _ = require('lodash'); + const fs = require('fs'); + const jsonfile = require('jsonfile'); const validaterRules = require('./validatorRules'); const promiseHelpers = require('./promiseHelpers'); - const fs = require('fs'); + let engines; const checkerResult = { @@ -20,7 +22,7 @@ let check = function(pathToPackage) { const packageJsonPath = pathToPackage || path.join(process.cwd(), 'package.json'); try { fs.accessSync(packageJsonPath); - engines = require(packageJsonPath).engines; + engines = jsonfile.readFileSync(pathToPackage).engines; } catch (ex) { checkerResult.message = {
started using jsonfile (fs) to get the package instead
diff --git a/python-package/lightgbm/libpath.py b/python-package/lightgbm/libpath.py index <HASH>..<HASH> 100644 --- a/python-package/lightgbm/libpath.py +++ b/python-package/lightgbm/libpath.py @@ -21,9 +21,8 @@ def find_lib_path(): os.path.join(curr_path, './lib/'), os.path.join(sys.prefix, 'lightgbm')] if os.name == 'nt': - dll_path.append(os.path.join(curr_path, '../../windows/x64/Dll/')) - dll_path.append(os.path.join(curr_path, './windows/x64/Dll/')) dll_path.append(os.path.join(curr_path, '../../Release/')) + dll_path.append(os.path.join(curr_path, '../../windows/x64/DLL/')) dll_path = [os.path.join(p, 'lib_lightgbm.dll') for p in dll_path] else: dll_path = [os.path.join(p, 'lib_lightgbm.so') for p in dll_path]
change the dll search order in windows (cmake-build first)
diff --git a/go/engine/pgp_pull.go b/go/engine/pgp_pull.go index <HASH>..<HASH> 100644 --- a/go/engine/pgp_pull.go +++ b/go/engine/pgp_pull.go @@ -5,9 +5,10 @@ package engine import ( "fmt" + "time" + "github.com/keybase/client/go/libkb" keybase1 "github.com/keybase/client/go/protocol/keybase1" - "time" ) type PGPPullEngineArg struct { @@ -257,7 +258,8 @@ func (e *PGPPullEngine) exportKeysToGPG(m libkb.MetaContext, user *libkb.User, t } if err := e.gpgClient.ExportKey(*bundle, false /* export public key only */, false /* no batch */); err != nil { - return err + m.Warning("Failed to import %'s public key %s: %s", user.GetName(), bundle.GetFingerprint(), err.Error()) + continue } m.Info("Imported key for %s.", user.GetName())
reduce severity of gpg2 import fails during keybase pgp pull (#<I>)
diff --git a/src/misc/Animation.js b/src/misc/Animation.js index <HASH>..<HASH> 100644 --- a/src/misc/Animation.js +++ b/src/misc/Animation.js @@ -191,24 +191,15 @@ Z.Util.extend(Z.animation.Player.prototype, { this.duration = duration; }, cancel:function() { - if (this._animeFrameId) { - Z.Util.cancelAnimFrame(this._animeFrameId); - } this.playState = "idle"; this.finished = false; }, finish:function() { - if (this._animeFrameId) { - Z.Util.cancelAnimFrame(this._animeFrameId); - } this.playState = "finished"; this.finished = true; }, pause:function() { - if (this._animeFrameId) { - Z.Util.cancelAnimFrame(this._animeFrameId); - } this.playState = "paused"; this.duration = this.duration - this.currentTime; },
remove cancelAnimation in Animation.js
diff --git a/transport/ws/src/main/java/org/kaazing/gateway/transport/ws/bridge/filter/WsFrameDecoder.java b/transport/ws/src/main/java/org/kaazing/gateway/transport/ws/bridge/filter/WsFrameDecoder.java index <HASH>..<HASH> 100644 --- a/transport/ws/src/main/java/org/kaazing/gateway/transport/ws/bridge/filter/WsFrameDecoder.java +++ b/transport/ws/src/main/java/org/kaazing/gateway/transport/ws/bridge/filter/WsFrameDecoder.java @@ -324,10 +324,8 @@ public class WsFrameDecoder extends CumulativeProtocolDecoderEx { * Checks if masking is allowed/expected for the frame being decoded. */ private void validateMaskingAllowed(boolean masked) throws ProtocolDecoderException { - if (masked && !maskingExpected) { - throw new ProtocolDecoderException("Received masked frame from server."); - } else if (!masked && maskingExpected) { - throw new ProtocolDecoderException("Received unmasked frame from client."); + if (masked != maskingExpected) { + throw new ProtocolDecoderException(String.format("Received unexpected %s frame", masked ? "masked" : "unmasked")); } }
update masking validation check according to feedback
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -269,7 +269,7 @@ const VirtualList = Vue.component('virtual-list', { if (dataSource) { if (Object.prototype.hasOwnProperty.call(dataSource, dataKey)) { slots.push(h(Item, { - key: dataSource[dataKey], + // key: dataSource[dataKey], props: { index, tag: itemTag,
Fix nextTick tigger before really render
diff --git a/src/main/java/net/bootsfaces/component/progressBar/ProgressBarRenderer.java b/src/main/java/net/bootsfaces/component/progressBar/ProgressBarRenderer.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/bootsfaces/component/progressBar/ProgressBarRenderer.java +++ b/src/main/java/net/bootsfaces/component/progressBar/ProgressBarRenderer.java @@ -68,7 +68,8 @@ public class ProgressBarRenderer extends CoreRenderer { double progressCompletion = (value - min) / (max - min) * 100; String style = "width: " + progressCompletion + "%;"; - style += progressBar.getStyle(); + //append inline style, if set + style += progressBar.getStyle() != null ? progressBar.getStyle() : ""; rw.writeAttribute("style", style, null); @@ -105,7 +106,8 @@ public class ProgressBarRenderer extends CoreRenderer { if (progressBar.isStriped() || progressBar.isAnimated()) classes += " progress-bar-striped"; - classes += " " + progressBar.getStyleClass(); + //append style class, if set + classes += progressBar.getStyleClass() != null ? " " + progressBar.getStyleClass() : ""; rw.writeAttribute("class", classes, "class"); }
dont append 'null' if no style was provided
diff --git a/src/Valkyrja/Http/Factories/ResponseFactory.php b/src/Valkyrja/Http/Factories/ResponseFactory.php index <HASH>..<HASH> 100644 --- a/src/Valkyrja/Http/Factories/ResponseFactory.php +++ b/src/Valkyrja/Http/Factories/ResponseFactory.php @@ -201,7 +201,7 @@ class ResponseFactory implements ResponseFactoryContract */ public function view(string $template, array $data = null, int $statusCode = null, array $headers = null): Response { - $content = $this->app->view()->make($template, $data)->render(); + $content = $this->app->view()->make($template, $data ?? [])->render(); return $this->createResponse($content, $statusCode, $headers); }
Fixing ResponseFactory::view.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -220,6 +220,7 @@ sources_phono3py = ['c/_phono3py.c', 'c/real_self_energy.c', 'c/real_to_reciprocal.c', 'c/reciprocal_to_normal.c', + 'c/rgrid.c', 'c/tetrahedron_method.c', 'c/triplet.c', 'c/triplet_iw.c',
Include forgotten file of rgrid.c in setup.py
diff --git a/src/ChrisKonnertz/DeepLy/DeepLy.php b/src/ChrisKonnertz/DeepLy/DeepLy.php index <HASH>..<HASH> 100644 --- a/src/ChrisKonnertz/DeepLy/DeepLy.php +++ b/src/ChrisKonnertz/DeepLy/DeepLy.php @@ -54,7 +54,7 @@ class DeepLy /** * Current version number */ - const VERSION = '1.0.0'; + const VERSION = '1.1.0'; /** * The protocol used for communication
--- VERSION <I> ---
diff --git a/wakatime/projects/base.py b/wakatime/projects/base.py index <HASH>..<HASH> 100644 --- a/wakatime/projects/base.py +++ b/wakatime/projects/base.py @@ -22,9 +22,9 @@ class BaseProject(object): be found for the current path. """ - def __init__(self, path, config): + def __init__(self, path, settings): self.path = path - self.config = config + self.settings = settings def type(self): """ Returns None if this is the base class. diff --git a/wakatime/projects/projectmap.py b/wakatime/projects/projectmap.py index <HASH>..<HASH> 100644 --- a/wakatime/projects/projectmap.py +++ b/wakatime/projects/projectmap.py @@ -23,7 +23,7 @@ log = logging.getLogger(__name__) class ProjectMap(BaseProject): def process(self): - if self.config: + if self.settings: return True return False @@ -33,8 +33,8 @@ class ProjectMap(BaseProject): def name(self): for path in self._path_generator(): - if self.config.has_option('projectmap', path): - return self.config.get('projectmap', path) + if self.settings.has_option('projectmap', path): + return self.settings.get('projectmap', path) return None
Rename config to settings in BaseProject
diff --git a/tests/models/test_seq2seq_model.py b/tests/models/test_seq2seq_model.py index <HASH>..<HASH> 100644 --- a/tests/models/test_seq2seq_model.py +++ b/tests/models/test_seq2seq_model.py @@ -90,7 +90,7 @@ class Model_SEQ2SEQ_Test(CustomTestCase): top_n = 1 for i in range(top_n): prediction = model_([test_sample], seq_length = self.dec_seq_length, start_token = 0, top_n = top_n) - print("Prediction: >>>>> ", prediction[0], "\n Target: >>>>> ", trainY[0,1:], "\n\n") + print("Prediction: >>>>> ", prediction[0].numpy(), "\n Target: >>>>> ", trainY[0,1:], "\n\n") # printing average loss after every epoch print('Epoch [{}/{}]: loss {:.4f}'.format(epoch + 1, self.num_epochs, total_loss / n_iter))
Print list instead of tensor
diff --git a/bin/grails-plugin-package.js b/bin/grails-plugin-package.js index <HASH>..<HASH> 100755 --- a/bin/grails-plugin-package.js +++ b/bin/grails-plugin-package.js @@ -133,7 +133,13 @@ archive.append( //adding standalone files for (var standaloneId in project.grails.standaloneFiles) { var stanalone = project.grails.standaloneFiles[standaloneId]; - archive.append(fs.readFileSync(path.join(buildDir, standaloneId)).toString(), {name: stanalone}); + + if (fs.lstatSync(path.join(buildDir, standaloneId)).isDirectory()) { + // append files from a directory if it's directory + archive.directory(path.join(buildDir, standaloneId)); + } else { + archive.append(fs.readFileSync(path.join(buildDir, standaloneId)).toString(), {name: stanalone}); + } } archive.finalize();
Added supporting direcroties as standaloneFiles.
diff --git a/salt/fileclient.py b/salt/fileclient.py index <HASH>..<HASH> 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -803,12 +803,17 @@ class Client(object): elif not os.path.isabs(cachedir): cachedir = os.path.join(self.opts['cachedir'], cachedir) + if url_data.query is not None: + file_name = '-'.join([url_data.path, url_data.query]) + else: + file_name = url_data.path + return salt.utils.path_join( cachedir, 'extrn_files', saltenv, netloc, - url_data.path + file_name )
cache query args with url as well Without this, we can't use query args to get the hash of a file or add query args to change what a file returns
diff --git a/bitshares/transactionbuilder.py b/bitshares/transactionbuilder.py index <HASH>..<HASH> 100644 --- a/bitshares/transactionbuilder.py +++ b/bitshares/transactionbuilder.py @@ -345,6 +345,7 @@ class TransactionBuilder(dict): signedtx.sign(self.wifs, chain=self.blockchain.rpc.chain_params) self["signatures"].extend(signedtx.json().get("signatures")) + return signedtx def verify_authority(self): """ Verify the authority of the signed transaction
Return newly created SignedTransaction when `sign` is invoked. This is useful for tearing down/rebuilding and passing transactions around.
diff --git a/src/views/ui_graph.py b/src/views/ui_graph.py index <HASH>..<HASH> 100644 --- a/src/views/ui_graph.py +++ b/src/views/ui_graph.py @@ -63,5 +63,5 @@ class Ui_Graph(object): def retranslateUi(self, Graph): pass -from matplotlibwidget import MatplotlibWidget +from widgets.matplotlibwidget import MatplotlibWidget import resources_rc
problem with matplotlibwidget to fix
diff --git a/js/render/console.js b/js/render/console.js index <HASH>..<HASH> 100644 --- a/js/render/console.js +++ b/js/render/console.js @@ -506,7 +506,8 @@ jsconsole.init = function () { editors.console.settings.render = function () { // TODO decide whether we should also grab all the JS in the HTML panel // jsconsole.reset(); - jsconsole.run(editors.javascript.render()); + var code = editors.javascript.render(); + if ($.trim(code)) jsconsole.run(code); }; editors.console.settings.show = function () { if (editors.live.visible) {
Only run console if we have some code in the js panel
diff --git a/includes/general.php b/includes/general.php index <HASH>..<HASH> 100644 --- a/includes/general.php +++ b/includes/general.php @@ -560,7 +560,7 @@ function pods_access ( $privs, $method = 'OR' ) { if ( 0 === strpos( $priv, 'manage_' ) ) $priv = pods_str_replace( 'manage_', 'pods_', $priv, 1 ); - if ( isset( $approved_privs[ $priv ] ) ) + if ( !isset( $approved_privs[ $priv ] ) ) return false; } @@ -2008,4 +2008,4 @@ function pods_session_start() { return true; -} \ No newline at end of file +}
pods_access used with AND always returns FALSE Fixes #<I>
diff --git a/src/dolo/misc/calculus.py b/src/dolo/misc/calculus.py index <HASH>..<HASH> 100644 --- a/src/dolo/misc/calculus.py +++ b/src/dolo/misc/calculus.py @@ -51,7 +51,14 @@ def solve_triangular_system(sdict,return_order=False,unknown_type=sympy.Symbol): else: res = copy.copy(sdict) for s in oks: - res[s] = lambda_sub(res[s],res) + try: + res[s] = lambda_sub(res[s],res) + except Exception as e: + print('Error evaluating: '+ str(res[s])) + print('with :') + print(res) + raise(e) + return [res,oks] def simple_triangular_solve(sdict, l=0):
(Slightly) better error messages for non triangular systems.
diff --git a/asyncblock.js b/asyncblock.js index <HASH>..<HASH> 100644 --- a/asyncblock.js +++ b/asyncblock.js @@ -39,7 +39,9 @@ var getNextTaskId = (function(){ var taskId = 1; return function(){ - return taskId++; + ++taskId; + + return '_ab_' + taskId; }; })();
Reducing likelihood of collision with generated task ids