diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/src/Filesystems/GcsFilesystem.php b/src/Filesystems/GcsFilesystem.php
index <HASH>..<HASH> 100644
--- a/src/Filesystems/GcsFilesystem.php
+++ b/src/Filesystems/GcsFilesystem.php
@@ -26,6 +26,7 @@ class GcsFilesystem implements Filesystem {
$storageClient = new StorageClient([
'projectId' => $config['project'],
+ 'keyFilePath' => isset($config['keyFilePath']) ? $config['keyFilePath'] : null,
]);
$bucket = $storageClient->bucket($config['bucket']);
|
Pass keyFilePath option to GCS client
|
diff --git a/nsq/__init__.py b/nsq/__init__.py
index <HASH>..<HASH> 100644
--- a/nsq/__init__.py
+++ b/nsq/__init__.py
@@ -17,4 +17,4 @@ except ImportError: # pragma: no cover
import json
# The current version
-__version__ = '0.1.8'
+__version__ = '0.1.9'
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -29,7 +29,7 @@ setup(name = 'nsq-py',
install_requires=[
'requests',
'decorator',
- 'url<=0.2.0',
+ 'url<0.2.0',
'statsd'
],
tests_requires=[
|
Correctly pin url dependency to <<I>
|
diff --git a/ontrack-web/src/app/view/view.search.js b/ontrack-web/src/app/view/view.search.js
index <HASH>..<HASH> 100644
--- a/ontrack-web/src/app/view/view.search.js
+++ b/ontrack-web/src/app/view/view.search.js
@@ -66,17 +66,24 @@ angular.module('ot.view.search', [
// Search type
let type = $location.search().type;
+ // Offset reset
+ if (request.token !== token || request.type !== type) {
+ request.offset = 0;
+ }
+
// Request
request.token = token;
- if (type) {
- request.type = type;
- }
+ request.type = type;
// Launching the search
otGraphqlService.pageGraphQLCall(query, request).then(function (data) {
$scope.searchDone = true;
$scope.pageInfo = data.search.pageInfo;
- $scope.results = $scope.results.concat(data.search.pageItems);
+ if (request.offset > 0) {
+ $scope.results = $scope.results.concat(data.search.pageItems);
+ } else {
+ $scope.results = data.search.pageItems;
+ }
// If only one result, switches directly to the correct page
if ($scope.results.length === 1) {
let result = $scope.results[0];
|
#<I> When launching a NEW search, erase previous results
|
diff --git a/lib/social_snippet/resolvers/dep_resolver.rb b/lib/social_snippet/resolvers/dep_resolver.rb
index <HASH>..<HASH> 100644
--- a/lib/social_snippet/resolvers/dep_resolver.rb
+++ b/lib/social_snippet/resolvers/dep_resolver.rb
@@ -49,7 +49,7 @@ module SocialSnippet
:context => new_context,
})
# find more deps
- found_tags.push *find_func(snippet.lines, new_context, tag)
+ found_tags.push *find_func(snippet.lines.to_a, new_context, tag)
end
return found_tags
|
dep_resolver: normalize String.lines() to Array
|
diff --git a/classes/PodsAPI.php b/classes/PodsAPI.php
index <HASH>..<HASH> 100644
--- a/classes/PodsAPI.php
+++ b/classes/PodsAPI.php
@@ -5046,6 +5046,11 @@ class PodsAPI {
$wpdb->query( "DELETE FROM `{$wpdb->options}` WHERE `option_name` LIKE '_transient_pods_%'" );
+ if ( in_array( $pod[ 'type' ], array( 'taxonomy', 'post_type' ) ) ) {
+ global $wp_rewrite;
+ $wp_rewrite->flush_rules();
+ }
+
wp_cache_flush();
}
|
Also flush rewrite rules when flushing a cache for posts and taxonomies.
|
diff --git a/pyusps/address_information.py b/pyusps/address_information.py
index <HASH>..<HASH> 100644
--- a/pyusps/address_information.py
+++ b/pyusps/address_information.py
@@ -2,7 +2,10 @@ import urllib2
import urllib
from lxml import etree
-from collections import OrderedDict
+try:
+ from collections import OrderedDict
+except ImportError:
+ from ordereddict import OrderedDict
api_url = 'http://production.shippingapis.com/ShippingAPI.dll'
address_max = 5
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -30,6 +30,7 @@ setup(
install_requires=[
'setuptools>=0.6c11',
'lxml>=2.3.3',
+ 'ordereddict==1.1',
],
extras_require=EXTRAS_REQUIRES,
)
|
Adds support for python < <I>
|
diff --git a/lib/pundit.rb b/lib/pundit.rb
index <HASH>..<HASH> 100644
--- a/lib/pundit.rb
+++ b/lib/pundit.rb
@@ -243,7 +243,7 @@ protected
else
"permitted_attributes"
end
- params.require(param_key).permit(policy.public_send(method_name))
+ params.require(param_key).permit(*policy.public_send(method_name))
end
# Cache of policies. You should not rely on this method.
|
Add splat lost in merge, it was fixed elabs/pundit#<I>, closes elabs/pundit#<I>
|
diff --git a/config/deploy.rb b/config/deploy.rb
index <HASH>..<HASH> 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -54,7 +54,7 @@ namespace :deploy do
on roles(:app) do
%w(log tmp/pids tmp/cache tmp/sockets public/system public/assets).each do |path|
execute "rm -rf #{release_path}/spec/dummy/#{path}"
- execute "ln -s #{release_path}/spec/dummy/log #{shared_path}/#{path}"
+ execute "ln -s #{shared_path}/#{path} #{release_path}/spec/dummy/#{path}"
end
end
end
|
update deploy to symlink dummy directories
|
diff --git a/lib/capnotify.rb b/lib/capnotify.rb
index <HASH>..<HASH> 100644
--- a/lib/capnotify.rb
+++ b/lib/capnotify.rb
@@ -49,7 +49,7 @@ module Capnotify
# by default, the output should be: "STAGE APPNAME @ BRANCH"
# override this to change the default behavior for capnotify.appname
_cset(:capnotify_appname) do
- name = [ fetch(:stage, nil), fetch(:application, nil) ].compact.map{|c| c.capitalize}.join(" ")
+ name = [ fetch(:stage, nil), fetch(:application, nil) ].compact.join(" ")
if fetch(:branch, nil)
name = "#{ name } @ #{ branch }"
end
|
yeah, probably shouldn't capitalize the appname
|
diff --git a/lib/adhearsion/punchblock_plugin.rb b/lib/adhearsion/punchblock_plugin.rb
index <HASH>..<HASH> 100644
--- a/lib/adhearsion/punchblock_plugin.rb
+++ b/lib/adhearsion/punchblock_plugin.rb
@@ -29,11 +29,11 @@ module Adhearsion
end
init :punchblock do
- Initializer.init if Adhearsion.config[:punchblock].enabled
+ Initializer.init if config.enabled
end
run :punchblock do
- Initializer.run if Adhearsion.config[:punchblock].enabled
+ Initializer.run if config.enabled
end
class << self
|
[CS] Cleanup access to config in punchblock plugin
|
diff --git a/src/openaccess_epub/main.py b/src/openaccess_epub/main.py
index <HASH>..<HASH> 100755
--- a/src/openaccess_epub/main.py
+++ b/src/openaccess_epub/main.py
@@ -189,6 +189,7 @@ def batch_input(args):
None, # Does not use custom image path
batch=True)
except:
+ error_file.write(item_path + '\n')
traceback.print_exc(file=error_file)
#Cleanup output directory, keeps EPUB and log
diff --git a/src/openaccess_epub/utils/element_methods.py b/src/openaccess_epub/utils/element_methods.py
index <HASH>..<HASH> 100644
--- a/src/openaccess_epub/utils/element_methods.py
+++ b/src/openaccess_epub/utils/element_methods.py
@@ -39,6 +39,23 @@ def getChildrenByTagName(self, tagName):
return child_list
+def getOptionalChild(self, tagName, not_found=None):
+ """
+ This method is used to return the first child with the supplied tagName
+ when the child may or may not exist.
+
+ This saves repetitive coding of blocks to check for child existence.
+
+ The optional not_found argument (default None) can be used to define what
+ should be returned by the method if the child does not exist.
+ """
+ try:
+ child = self.getChildrenByTagName(tagName)[0]
+ except IndexError:
+ child = not_found
+ return child
+
+
def removeAllAttributes(self):
"""
This method will remove all attributes of any provided element.
|
adding file name to batch_traceback collection, and providing a new method to refactor optional children
|
diff --git a/services/config.js b/services/config.js
index <HASH>..<HASH> 100644
--- a/services/config.js
+++ b/services/config.js
@@ -38,6 +38,10 @@ exports.init = function(callback) {
return callback(err);
} else {
exports.decryptionKey = result;
+ security.decryptObject(config, function (str) {
+ //Decryption function
+ return security.decrypt(str, result);
+ });
return callback();
}
});
|
Encrypted properties aren't getting decrypted properly in a single-server environment
|
diff --git a/websockets/protocol.py b/websockets/protocol.py
index <HASH>..<HASH> 100644
--- a/websockets/protocol.py
+++ b/websockets/protocol.py
@@ -391,11 +391,8 @@ class WebSocketCommonProtocol(asyncio.StreamReaderProtocol):
# Handle flow control automatically.
yield from self.writer.drain()
except ConnectionResetError:
- # Terminate the connection if the socket died,
- # unless it's already being closed.
- if expected_state != CLOSING:
- self.state = CLOSING
- yield from self.fail_connection(1006)
+ # Terminate the connection if the socket died.
+ yield from self.fail_connection(1006)
@asyncio.coroutine
def close_connection(self):
|
Remove supefluous check.
fail_connection() can now be called safely multiple times in parallel,
solving the general problem, while this check only adressed an instance.
|
diff --git a/getgauge/static_loader.py b/getgauge/static_loader.py
index <HASH>..<HASH> 100644
--- a/getgauge/static_loader.py
+++ b/getgauge/static_loader.py
@@ -16,8 +16,9 @@ def load_steps(content, file_name):
if decorator.value.__str__() == 'step':
steps = re.findall(r'[\'"](.*?)[\'"]', decorator.call.__str__())
add_steps(file_name, func, steps)
- except BaronError:
- pass
+ except BaronError as e:
+ print(e.message[:-640])
+
def reload_steps(content, file_name):
diff --git a/start.py b/start.py
index <HASH>..<HASH> 100755
--- a/start.py
+++ b/start.py
@@ -2,7 +2,7 @@ import platform
import sys
from colorama import Style, init
-
+from os import path
from getgauge import connection, processor
from getgauge.impl_loader import copy_skel_files
from getgauge.static_loader import load_files
@@ -16,7 +16,11 @@ def main():
copy_skel_files()
else:
s = connection.connect()
- load_files(get_step_impl_dir())
+ dir = get_step_impl_dir()
+ if path.exists(dir):
+ load_files(dir)
+ else:
+ print('can not load implementations from {}. {} does not exist.'.format(dir, dir))
processor.dispatch_messages(s)
|
loading steps only if step_impl_dir exist.
|
diff --git a/core/client/src/test/java/alluxio/client/file/URIStatusTest.java b/core/client/src/test/java/alluxio/client/file/URIStatusTest.java
index <HASH>..<HASH> 100644
--- a/core/client/src/test/java/alluxio/client/file/URIStatusTest.java
+++ b/core/client/src/test/java/alluxio/client/file/URIStatusTest.java
@@ -37,7 +37,7 @@ public class URIStatusTest {
/**
* Tests getting and setting fields.
*/
- @Test (timeout = 10000)
+ @Test
public void fieldsTest() {
FileInfo fileInfo = FileInfoTest.createRandom();
URIStatus uriStatus = new URIStatus(fileInfo);
@@ -72,7 +72,7 @@ public class URIStatusTest {
Assert.assertEquals(uriStatus.toString(), fileInfo.toString());
}
- @Test (timeout = 10000)
+ @Test
public void testEquals() throws Exception {
FileInfo fileInfo = FileInfoTest.createRandom();
URIStatus uriStatus1 = new URIStatus(fileInfo);
|
[Alluxio-<I>] Add unit tests for URIStatus. Address comments on pull
request-<I>-<I>-<I>
|
diff --git a/bitshares/wallet.py b/bitshares/wallet.py
index <HASH>..<HASH> 100644
--- a/bitshares/wallet.py
+++ b/bitshares/wallet.py
@@ -339,12 +339,12 @@ class Wallet():
def getKeyType(self, account, pub):
""" Get key type
"""
- if pub == account["options"]["memo_key"]:
- return "memo"
for authority in ["owner", "active"]:
for key in account[authority]["key_auths"]:
if pub == key[0]:
return authority
+ if pub == account["options"]["memo_key"]:
+ return "memo"
return None
def getAccounts(self):
|
[wallet] active keys have priority over memo keys
|
diff --git a/benchexec/tools/coveriteam-verifier-validator.py b/benchexec/tools/coveriteam-verifier-validator.py
index <HASH>..<HASH> 100644
--- a/benchexec/tools/coveriteam-verifier-validator.py
+++ b/benchexec/tools/coveriteam-verifier-validator.py
@@ -30,7 +30,7 @@ class Tool(coveriteam.Tool):
task, {ILP32: "ILP32", LP64: "LP64"}
)
if data_model_param and not any(
- [option.startswith("data_model=") for option in options]
+ re.match("data_model *=", option) for option in options
):
options += ["--input", "data_model=" + data_model_param]
|
Moved to regex match instead of startswith, removed unnecessary list comprehension
|
diff --git a/packages/input-select/src/Select.js b/packages/input-select/src/Select.js
index <HASH>..<HASH> 100644
--- a/packages/input-select/src/Select.js
+++ b/packages/input-select/src/Select.js
@@ -148,7 +148,7 @@ class Select extends React.Component {
) : (
<Item
label={item.label}
- id={this.props.id && `${this.props.id}-item-${item.label}`}
+ id={this.props.id && `${this.props.id}-item-${item.value}`}
image={item.image}
selected={selected}
/>
|
feat(Select): Use value to compose Item id
|
diff --git a/src/progress.js b/src/progress.js
index <HASH>..<HASH> 100644
--- a/src/progress.js
+++ b/src/progress.js
@@ -110,7 +110,7 @@ Progress.prototype.setText = function setText(text) {
if (this._progressPath === null) throw new Error(DESTROYED_ERROR);
if (this.text === null) {
- this.text = this._createTextElement(this._container, text);
+ this.text = this._createTextElement(this._opts, this._container);
this._container.appendChild(this.text);
return;
}
|
Fix bug where setting text without initial text definition failed
|
diff --git a/lib/health-data-standards/import/cat1/lab_result_importer.rb b/lib/health-data-standards/import/cat1/lab_result_importer.rb
index <HASH>..<HASH> 100644
--- a/lib/health-data-standards/import/cat1/lab_result_importer.rb
+++ b/lib/health-data-standards/import/cat1/lab_result_importer.rb
@@ -6,10 +6,6 @@ module HealthDataStandards
super(entry_finder)
@entry_class = LabResult
end
-
- def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
- super
- end
end
end
end
|
Removing a method that only called super
|
diff --git a/examples/simple.go b/examples/simple.go
index <HASH>..<HASH> 100644
--- a/examples/simple.go
+++ b/examples/simple.go
@@ -20,6 +20,11 @@ var qs = []*probe.Question{
}
func main() {
- answers := probe.Ask(qs)
+ answers, err := probe.Ask(qs)
+ if err != nil {
+ fmt.Println("\n", err.Error())
+ return
+ }
+
fmt.Printf("%s chose %s.\n", answers["name"], answers["color"])
}
diff --git a/probe.go b/probe.go
index <HASH>..<HASH> 100644
--- a/probe.go
+++ b/probe.go
@@ -14,7 +14,7 @@ type Prompt interface {
Prompt() (string, error)
}
-func Ask(qs []*Question) map[string]string {
+func Ask(qs []*Question) (map[string]string, error) {
// the response map
res := make(map[string]string)
// go over every question
@@ -23,11 +23,12 @@ func Ask(qs []*Question) map[string]string {
ans, err := q.Prompt.Prompt()
// if something went wrong
if err != nil {
- panic(err)
+ // stop listening
+ return nil, err
}
// add it to the map
res[q.Name] = ans
}
// return the response
- return res
+ return res, nil
}
|
ask no longer panics, just returns error
|
diff --git a/intranet/apps/auth/backends.py b/intranet/apps/auth/backends.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/auth/backends.py
+++ b/intranet/apps/auth/backends.py
@@ -62,7 +62,8 @@ class KerberosAuthenticationBackend(object):
return True
else:
logger.debug("Kerberos failed to authorize {}".format(username))
- del os.environ["KRB5CCNAME"]
+ if "KRB5CCNAME" in os.environ:
+ del os.environ["KRB5CCNAME"]
return False
def authenticate(self, username=None, password=None):
|
Check for env var before deleting it
|
diff --git a/spyder/plugins/completion/plugin.py b/spyder/plugins/completion/plugin.py
index <HASH>..<HASH> 100644
--- a/spyder/plugins/completion/plugin.py
+++ b/spyder/plugins/completion/plugin.py
@@ -756,7 +756,8 @@ class CompletionPlugin(SpyderPluginV2):
self.requests[req_id]['timed_out'] = True
# Send request to all running completion providers
- for provider_name in self.providers:
+ providers = self.available_providers_for_language(language.lower())
+ for provider_name in providers:
provider_info = self.providers[provider_name]
provider_info['instance'].send_request(
language, req_type, req, req_id)
@@ -781,7 +782,8 @@ class CompletionPlugin(SpyderPluginV2):
**kwargs: notification-specific parameters
}
"""
- for provider_name in self.providers:
+ providers = self.available_providers_for_language(language.lower())
+ for provider_name in providers:
provider_info = self.providers[provider_name]
if provider_info['status'] == self.RUNNING:
provider_info['instance'].send_notification(
|
Ensure that requests are only dispatched to servers that have a language available
|
diff --git a/client/state/sharing/keyring/selectors.js b/client/state/sharing/keyring/selectors.js
index <HASH>..<HASH> 100644
--- a/client/state/sharing/keyring/selectors.js
+++ b/client/state/sharing/keyring/selectors.js
@@ -7,6 +7,11 @@
import { filter, values } from 'lodash';
/**
+ * Internal dependencies
+ */
+import createSelector from 'lib/create-selector';
+
+/**
* Returns an array of keyring connection objects.
*
* @param {Object} state Global state tree
@@ -34,9 +39,10 @@ export function getKeyringConnectionById( state, keyringConnectionId ) {
* @param {String} service Service slug.
* @return {Array} Keyring connections, if known.
*/
-export function getKeyringConnectionsByName( state, service ) {
- return filter( getKeyringConnections( state ), { service } );
-}
+export const getKeyringConnectionsByName = createSelector(
+ ( state, service ) => filter( getKeyringConnections( state ), { service } ),
+ state => [ state.sharing.keyring.items ]
+);
/**
* Returns an array of keyring connection objects for a specific user.
|
Unless the dependecy changed, we shouldn't change this selector's result
|
diff --git a/molgenis-omx-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java b/molgenis-omx-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java
index <HASH>..<HASH> 100644
--- a/molgenis-omx-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java
+++ b/molgenis-omx-dataexplorer/src/main/java/org/molgenis/dataexplorer/controller/DataExplorerController.java
@@ -104,9 +104,6 @@ public class DataExplorerController extends MolgenisPluginController
@Autowired
private MolgenisSettings molgenisSettings;
- @Autowired
- private SearchService searchService;
-
public DataExplorerController()
{
super(URI);
|
remove unused searchservice + fix bug: error occurs when selecting "select..." in aggregates
|
diff --git a/src/main/java/com/github/maven_nar/NarSystemMojo.java b/src/main/java/com/github/maven_nar/NarSystemMojo.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/maven_nar/NarSystemMojo.java
+++ b/src/main/java/com/github/maven_nar/NarSystemMojo.java
@@ -208,7 +208,7 @@ public class NarSystemMojo
builder.append(delimiter);
delimiter = " else ";
- builder.append("if (ao.equals(\"").append(entry.getKey()).append("\")) {\n");
+ builder.append("if (ao.startsWith(\"").append(entry.getKey()).append("\")) {\n");
builder.append(" return new String[] {\n");
String delimiter2 = " ";
for (final String aol : entry.getValue()) {
|
Better "Windows" OS compatibility in native-lib-loader context.
In Windows case, operating systems are started-with "Windows *". Instead of using ao.equals(), ao.startsWith() is suitable for deciding OS types in such a case.
|
diff --git a/test/generator_test.rb b/test/generator_test.rb
index <HASH>..<HASH> 100644
--- a/test/generator_test.rb
+++ b/test/generator_test.rb
@@ -1,4 +1,3 @@
-require 'minitest/unit'
require 'minitest/autorun'
require 'token_phrase'
|
change require order for minitest on <I>
|
diff --git a/presence.go b/presence.go
index <HASH>..<HASH> 100644
--- a/presence.go
+++ b/presence.go
@@ -134,25 +134,19 @@ func LastIndexOf(in interface{}, elem interface{}) int {
// Contains returns true if an element is present in a iteratee.
func Contains(in interface{}, elem interface{}) bool {
inValue := reflect.ValueOf(in)
-
elemValue := reflect.ValueOf(elem)
-
inType := inValue.Type()
- if inType.Kind() == reflect.String {
+ switch inType.Kind() {
+ case reflect.String:
return strings.Contains(inValue.String(), elemValue.String())
- }
-
- if inType.Kind() == reflect.Map {
- keys := inValue.MapKeys()
- for i := 0; i < len(keys); i++ {
- if equal(keys[i].Interface(), elem) {
+ case reflect.Map:
+ for _, key := range inValue.MapKeys() {
+ if equal(key.Interface(), elem) {
return true
}
}
- }
-
- if inType.Kind() == reflect.Slice {
+ case reflect.Slice:
for i := 0; i < inValue.Len(); i++ {
if equal(inValue.Index(i).Interface(), elem) {
return true
|
In 'Contains', save one comparison against reflect.Slice for Map that does not contain the key
|
diff --git a/src/infi/docopt_completion/bash.py b/src/infi/docopt_completion/bash.py
index <HASH>..<HASH> 100644
--- a/src/infi/docopt_completion/bash.py
+++ b/src/infi/docopt_completion/bash.py
@@ -48,8 +48,8 @@ class BashCompletion(CompletionGenerator):
return SUBCOMMAND_SWITCH_TEMPLATE.format(level_num=level_num, subcommand_cases=subcommand_cases)
def create_compreply(self, subcommands, opts):
- return " ".join(opts) + " ".join(subcommands.keys())
-
+ return " ".join(opts) + " " + " ".join(subcommands.keys())
+
def create_section(self, cmd_name, param_tree, option_help, level_num):
subcommands = param_tree.subcommands
opts = param_tree.options
|
fix bad bash reply (reported in issue #2)
|
diff --git a/src/Producer.php b/src/Producer.php
index <HASH>..<HASH> 100644
--- a/src/Producer.php
+++ b/src/Producer.php
@@ -31,6 +31,13 @@ class Producer
$queue = $this->queues->create($queueName);
$queue->enqueue($envelope = new Envelope($message));
- $this->dispatcher->dispatch(BernardEvents::PRODUCE, new EnvelopeEvent($envelope, $queue));
+ $this->dispatch(BernardEvents::PRODUCE, new EnvelopeEvent($envelope, $queue));
+ }
+
+ private function dispatch($eventName, EnvelopeEvent $event)
+ {
+ $this->dispatcher instanceof \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
+ ? $this->dispatcher->dispatch($event, $eventName)
+ : $this->dispatcher->dispatch($eventName, $event);
}
}
|
Increase compatibility with Symfony <I> by using proper order of parameters
|
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py
index <HASH>..<HASH> 100644
--- a/discord/ext/commands/bot.py
+++ b/discord/ext/commands/bot.py
@@ -268,13 +268,13 @@ class Bot(GroupMixin, discord.Client):
@asyncio.coroutine
def close(self):
- for extension in self.extensions:
+ for extension in tuple(self.extensions):
try:
self.unload_extension(extension)
except:
pass
- for cog in self.cogs:
+ for cog in tuple(self.cogs):
try:
self.remove_cog(cog)
except:
|
[commands] Shield against dictionary resize in Bot.close
|
diff --git a/lxd/storage/drivers/driver_cephfs_volumes.go b/lxd/storage/drivers/driver_cephfs_volumes.go
index <HASH>..<HASH> 100644
--- a/lxd/storage/drivers/driver_cephfs_volumes.go
+++ b/lxd/storage/drivers/driver_cephfs_volumes.go
@@ -343,7 +343,8 @@ func (d *cephfs) MountVolume(vol Volume, op *operations.Operation) (bool, error)
}
// UnmountVolume clears any runtime state for the volume.
-func (d *cephfs) UnmountVolume(vol Volume, op *operations.Operation) (bool, error) {
+// As driver doesn't have volumes to unmount it returns false indicating the volume was already unmounted.
+func (d *cephfs) UnmountVolume(vol Volume, keepBlockDev bool, op *operations.Operation) (bool, error) {
return false, nil
}
|
lxd/storage/drivers/driver/cephfs/volumes: Adds keepBlockDev arg to UnmountVolume
|
diff --git a/lib/parse/push.rb b/lib/parse/push.rb
index <HASH>..<HASH> 100755
--- a/lib/parse/push.rb
+++ b/lib/parse/push.rb
@@ -13,7 +13,7 @@ module Parse
attr_accessor :push_time
attr_accessor :data
- def initialize(data, channel = "")
+ def initialize(data, channel = "", client=nil)
@data = data
if !channel || channel.empty?
@@ -22,6 +22,8 @@ module Parse
else
@channel = channel
end
+
+ @client = client || Parse.client
end
def save
@@ -52,7 +54,7 @@ module Parse
body.merge!({ :expiration_time => @expiration_time }) if @expiration_time
body.merge!({ :push_time => @push_time }) if @push_time
- response = Parse.client.request uri, :post, body.to_json, nil
+ response = @client.request uri, :post, body.to_json, nil
end
end
|
Added support for specified Parse client instantiation in push initializer
|
diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/setup.py b/sdk/cognitivelanguage/azure-ai-language-conversations/setup.py
index <HASH>..<HASH> 100644
--- a/sdk/cognitivelanguage/azure-ai-language-conversations/setup.py
+++ b/sdk/cognitivelanguage/azure-ai-language-conversations/setup.py
@@ -74,6 +74,7 @@ setup(
},
install_requires=[
"azure-core<2.0.0,>=1.24.0",
+ "isodate>=0.6.0",
],
project_urls={
'Bug Reports': 'https://github.com/Azure/azure-sdk-for-python/issues',
|
add dependency on isodate since we removed msrest (#<I>)
|
diff --git a/seleniumbase/core/log_helper.py b/seleniumbase/core/log_helper.py
index <HASH>..<HASH> 100755
--- a/seleniumbase/core/log_helper.py
+++ b/seleniumbase/core/log_helper.py
@@ -10,7 +10,10 @@ from seleniumbase.config import settings
def log_screenshot(test_logpath, driver):
screenshot_name = settings.SCREENSHOT_NAME
screenshot_path = "%s/%s" % (test_logpath, screenshot_name)
- driver.get_screenshot_as_file(screenshot_path)
+ try:
+ driver.get_screenshot_as_file(screenshot_path)
+ except Exception:
+ print("WARNING: Unable to get screenshot for failure logs!")
def log_test_failure_data(test, test_logpath, driver, browser):
|
Better handling of failure screenshots for logs
|
diff --git a/src/geo/leaflet/torque.js b/src/geo/leaflet/torque.js
index <HASH>..<HASH> 100644
--- a/src/geo/leaflet/torque.js
+++ b/src/geo/leaflet/torque.js
@@ -46,6 +46,7 @@ var LeafLetTorqueLayer = L.TorqueLayer.extend({
auth_token: layerModel.get('auth_token'),
no_cdn: layerModel.get('no_cdn'),
dynamic_cdn: layerModel.get('dynamic_cdn'),
+ loop: layerModel.get('loop'),
instanciateCallback: function() {
var cartocss = layerModel.get('cartocss') || layerModel.get('tile_style');
|
registers the loop option on the torque layer when called from cdbjs
|
diff --git a/launch_control/dashboard_app/admin.py b/launch_control/dashboard_app/admin.py
index <HASH>..<HASH> 100644
--- a/launch_control/dashboard_app/admin.py
+++ b/launch_control/dashboard_app/admin.py
@@ -39,7 +39,6 @@ class BundleStreamAdminForm(forms.ModelForm):
def clean(self):
cleaned_data = self.cleaned_data
- print cleaned_data
if (cleaned_data.get('user', '') is not None and
cleaned_data.get('group') is not None):
raise forms.ValidationError('BundleStream cannot have both user '
|
Remove debugging print statement from admin panel
|
diff --git a/scripts/deploy-gh-pages.js b/scripts/deploy-gh-pages.js
index <HASH>..<HASH> 100644
--- a/scripts/deploy-gh-pages.js
+++ b/scripts/deploy-gh-pages.js
@@ -1,6 +1,6 @@
var path = require('path');
var ghpages = require('gh-pages');
-var basePath = path.join(__dirname, '../dist');
+var basePath = path.join(__dirname, '../docs/dist');
var repoUrl = require('../package.json').repository.url;
var GH_PAGES_TOKEN = process.env.GH_PAGES_TOKEN;
|
docs(site): Fix GitHub Pages deployment (#<I>)
|
diff --git a/test/src/Provider/GoogleTest.php b/test/src/Provider/GoogleTest.php
index <HASH>..<HASH> 100644
--- a/test/src/Provider/GoogleTest.php
+++ b/test/src/Provider/GoogleTest.php
@@ -44,7 +44,10 @@ class GoogleTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('mock_access_type', $query['access_type']);
$this->assertEquals('mock_domain', $query['hd']);
- $this->assertEquals('profile email', $query['scope']);
+
+ $this->assertContains('email', $query['scope']);
+ $this->assertContains('profile', $query['scope']);
+ $this->assertContains('openid', $query['scope']);
$this->assertAttributeNotEmpty('state', $this->provider);
}
|
Update test for new scope definition
Refs #2
|
diff --git a/js/waves.js b/js/waves.js
index <HASH>..<HASH> 100644
--- a/js/waves.js
+++ b/js/waves.js
@@ -262,7 +262,7 @@
if (!(target instanceof SVGElement) && target.className.indexOf('waves-effect') !== -1) {
element = target;
break;
- } else if (target.classList.contains('waves-effect')) {
+ } else if (target.className.indexOf('waves-effect') !== -1) {
element = target;
break;
}
|
Changed classList to className for better compatibility
|
diff --git a/test/model.js b/test/model.js
index <HASH>..<HASH> 100644
--- a/test/model.js
+++ b/test/model.js
@@ -384,17 +384,6 @@ $(document).ready(function() {
equal(lastError, "Can't change admin status.");
});
- test("isValid", function() {
- var model = new Backbone.Model({valid: true});
- model.validate = function(attrs) {
- if (!attrs.valid) return "invalid";
- };
- equal(model.isValid(), true);
- equal(model.set({valid: false}), false);
- equal(model.isValid(), true);
- ok(!model.set('valid', false, {silent: true}));
- });
-
test("save", 2, function() {
doc.save({title : "Henry V"});
equal(this.syncArgs.method, 'update');
@@ -818,12 +807,6 @@ $(document).ready(function() {
model.set({a: true});
});
- test("#1179 - isValid returns true in the absence of validate.", 1, function() {
- var model = new Backbone.Model();
- model.validate = null;
- ok(model.isValid());
- });
-
test("#1122 - clear does not alter options.", 1, function() {
var model = new Backbone.Model();
var options = {};
|
removing old isValid tests
|
diff --git a/server/helpers/link-to-record.js b/server/helpers/link-to-record.js
index <HASH>..<HASH> 100644
--- a/server/helpers/link-to-record.js
+++ b/server/helpers/link-to-record.js
@@ -3,7 +3,6 @@
*
* usage: {{#link-to-record record=record class="btn btn-default"}}Text inside the link{{/link-to-record}}
*/
-var hbs = require('hbs');
module.exports = function(we) {
return function linkTo() {
@@ -23,6 +22,6 @@ module.exports = function(we) {
l += options.fn(this);
l += '</a>';
- return new hbs.SafeString(l);
+ return new we.hbs.SafeString(l);
}
}
\ No newline at end of file
|
remove uneed require hbs from link-to-record helper
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -72,6 +72,18 @@ module.exports = function(grunt) {
// Copy folders and files
copy: {
+ cssAsScss: {
+ files: [
+ {
+ expand: true,
+ cwd: 'src/assets/_components',
+ src: ['**/*.css'],
+ dest: 'src/assets/_components',
+ filter: 'isFile',
+ ext: ".scss"
+ }
+ ]
+ },
jekyllBuildToDist: {
files: [
{
|
Add task to transform css into scss.
|
diff --git a/src/js/components/LoginForm.js b/src/js/components/LoginForm.js
index <HASH>..<HASH> 100644
--- a/src/js/components/LoginForm.js
+++ b/src/js/components/LoginForm.js
@@ -97,7 +97,7 @@ var LoginForm = React.createClass({
</FormField>
</fieldset>
{errors}
- <Button className={CLASS_ROOT + "__submit"} primary={true} strong={true}
+ <Button id="login_button" className={CLASS_ROOT + "__submit"} primary={true} strong={true}
label={this.getGrommetIntlMessage('Log In')}
onClick={this._onSubmit} />
{footer}
|
Added ID to login button for test automation
|
diff --git a/src/core/body.js b/src/core/body.js
index <HASH>..<HASH> 100644
--- a/src/core/body.js
+++ b/src/core/body.js
@@ -495,6 +495,28 @@
},
/**
+ * Body#toBodyCoords( v ) -> Physics.vector
+ * - v (Physics.vector): The vector to transform
+ * + (Physics.vector): The transformed vector
+ *
+ * Transform a vector into coordinates relative to this body.
+ **/
+ toBodyCoords: function( v ){
+ return v.vsub( this.state.pos ).rotate( -this.state.angular.pos );
+ },
+
+ /**
+ * Body#toWorldCoords( v ) -> Physics.vector
+ * - v (Physics.vector): The vector to transform
+ * + (Physics.vector): The transformed vector
+ *
+ * Transform a vector from body coordinates into world coordinates.
+ **/
+ toWorldCoords: function( v ){
+ return v.rotate( this.state.angular.pos ).vadd( this.state.pos );
+ },
+
+ /**
* Body#recalc() -> this
*
* Recalculate properties.
|
feature re #<I> methods transform world/body coords
|
diff --git a/lib/evalhook.rb b/lib/evalhook.rb
index <HASH>..<HASH> 100644
--- a/lib/evalhook.rb
+++ b/lib/evalhook.rb
@@ -139,8 +139,15 @@ module EvalHook
def hooked_method(receiver, mname, klass = nil) #:nodoc:
m = nil
+ is_method_missing = false
+
unless klass
- m = receiver.method(mname)
+ m = begin
+ receiver.method(mname)
+ rescue
+ is_method_missing = true
+ receiver.public_method(:method_missing)
+ end
klass = m.owner
else
m = klass.instance_method(mname).bind(receiver)
@@ -160,6 +167,10 @@ module EvalHook
end
end
+ if is_method_missing
+ orig_m = m
+ m = lambda{|*x| orig_m.call(mname,*x) }
+ end
m
end
|
<I> test pass: method missing with one argument
|
diff --git a/src/Maple.js b/src/Maple.js
index <HASH>..<HASH> 100644
--- a/src/Maple.js
+++ b/src/Maple.js
@@ -113,7 +113,7 @@ import events from './helpers/Events.js';
mutations.forEach((mutation) => {
- var addedNodes = utility.toArray(mutation.addedNodes);
+ let addedNodes = utility.toArray(mutation.addedNodes);
addedNodes.forEach((node) => {
diff --git a/src/helpers/Utility.js b/src/helpers/Utility.js
index <HASH>..<HASH> 100644
--- a/src/helpers/Utility.js
+++ b/src/helpers/Utility.js
@@ -227,7 +227,7 @@ export default (function main($document) {
*/
isHTMLImport(htmlElement) {
- var isInstance = htmlElement instanceof HTMLLinkElement,
+ let isInstance = htmlElement instanceof HTMLLinkElement,
isImport = String(htmlElement.getAttribute('rel')).toLowerCase() === 'import',
hasHrefAttr = htmlElement.hasAttribute('href'),
hasTypeHtml = String(htmlElement.getAttribute('type')).toLowerCase() === 'text/html';
|
Changed from 'var' to 'let' :zzz:
|
diff --git a/src/components/notebook.js b/src/components/notebook.js
index <HASH>..<HASH> 100644
--- a/src/components/notebook.js
+++ b/src/components/notebook.js
@@ -1,5 +1,5 @@
import React from 'react';
-import { DragDropContext } from 'react-dnd';
+import { DragDropContext as dragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import DraggableCell from './cell/draggable-cell';
@@ -97,4 +97,4 @@ class Notebook extends React.Component {
}
}
-export default DragDropContext(HTML5Backend)(Notebook);
+export default dragDropContext(HTML5Backend)(Notebook);
|
Appease the linter and myself.
|
diff --git a/src/Message/AIMResponse.php b/src/Message/AIMResponse.php
index <HASH>..<HASH> 100644
--- a/src/Message/AIMResponse.php
+++ b/src/Message/AIMResponse.php
@@ -24,7 +24,7 @@ class AIMResponse extends AbstractResponse
$xml = preg_replace('/<createTransactionResponse[^>]+>/', '<createTransactionResponse>', (string)$data);
try {
- $xml = simplexml_load_string($xml);
+ $xml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOWARNING);
} catch (\Exception $e) {
throw new InvalidResponseException();
}
|
Forgot to save file before last commit.
|
diff --git a/lib/svtplay_dl/__init__.py b/lib/svtplay_dl/__init__.py
index <HASH>..<HASH> 100644
--- a/lib/svtplay_dl/__init__.py
+++ b/lib/svtplay_dl/__init__.py
@@ -14,7 +14,7 @@ from svtplay_dl.log import log
from svtplay_dl.utils import decode_html_entities, filenamify, select_quality
from svtplay_dl.service import service_handler, Generic
from svtplay_dl.fetcher import VideoRetriever
-from svtplay_dl.subtitle import subtitle, subtitle_json, subtitle_sami, subtitle_smi, subtitle_tt, subtitle_wsrt
+from svtplay_dl.subtitle import subtitle
__version__ = "0.9.2014.04.27"
|
init: removing unused imports.
|
diff --git a/src/rest/Response.php b/src/rest/Response.php
index <HASH>..<HASH> 100644
--- a/src/rest/Response.php
+++ b/src/rest/Response.php
@@ -20,7 +20,7 @@ class Response {
function __construct (ResponseInterface $response) {
$this->status_code = $response->getStatusCode();
$this->headers = $response->getHeaders();
- $this->body = $response->getBody();
+ $this->body = $response->getBody()->getContents();
$this->ok = 400 <= $this->status_code && $this->status_code < 600;
$this->json = json_decode($this->body);
}
|
TSMD-<I> return body as string
|
diff --git a/tests/spec/Inheritance.js b/tests/spec/Inheritance.js
index <HASH>..<HASH> 100644
--- a/tests/spec/Inheritance.js
+++ b/tests/spec/Inheritance.js
@@ -25,6 +25,22 @@ describe("John Resig Simple Inheritance", function () {
var p = new Person(true);
var n = new Ninja();
+ it("p is an instance of Person", function () {
+ expect(p).toBeInstanceOf(Person);
+ });
+
+ it("p is not an instance of Ninja", function () {
+ expect(p).not.toBeInstanceOf(Ninja);
+ });
+
+ it("n is an instance of Ninja", function () {
+ expect(n).toBeInstanceOf(Ninja);
+ });
+
+ it("n is also an instance of Person", function () {
+ expect(n).toBeInstanceOf(Person);
+ });
+
it("p can dance", function () {
expect(p.dance()).toEqual(true);
});
|
added more test cases to the inheritance test unit
|
diff --git a/gwpy/io/cache.py b/gwpy/io/cache.py
index <HASH>..<HASH> 100644
--- a/gwpy/io/cache.py
+++ b/gwpy/io/cache.py
@@ -70,7 +70,7 @@ except NameError: # python3.x
# -- cache I/O ----------------------------------------------------------------
def read_cache(cachefile, coltype=LIGOTimeGPS):
- """Read a LAL- for FFL-format cache file as a list of file paths
+ """Read a LAL- or FFL-format cache file as a list of file paths
Parameters
----------
|
gwpy.io: fixed typo in docstring
[skip ci] [skip appveyor]
|
diff --git a/src/routerComponent.js b/src/routerComponent.js
index <HASH>..<HASH> 100644
--- a/src/routerComponent.js
+++ b/src/routerComponent.js
@@ -83,7 +83,7 @@ export default class RouterComponent extends Component {
});
}
- if (this.currentComponent !== null) {
+ if (this.currentComponent !== undefined && this.currentComponent !== null) {
this.currentComponent.activate();
}
};
|
routerComponent: FIX: exception if initial path is incorrect
|
diff --git a/session.go b/session.go
index <HASH>..<HASH> 100644
--- a/session.go
+++ b/session.go
@@ -944,7 +944,7 @@ func (q *Query) DefaultTimestamp(enable bool) *Query {
// WithTimestamp will enable the with default timestamp flag on the query
// like DefaultTimestamp does. But also allows to define value for timestamp.
// It works the same way as USING TIMESTAMP in the query itself, but
-// should not break prepared query optimization
+// should not break prepared query optimization.
//
// Only available on protocol >= 3
func (q *Query) WithTimestamp(timestamp int64) *Query {
@@ -1722,7 +1722,7 @@ func (b *Batch) DefaultTimestamp(enable bool) *Batch {
// WithTimestamp will enable the with default timestamp flag on the query
// like DefaultTimestamp does. But also allows to define value for timestamp.
// It works the same way as USING TIMESTAMP in the query itself, but
-// should not break prepared query optimization
+// should not break prepared query optimization.
//
// Only available on protocol >= 3
func (b *Batch) WithTimestamp(timestamp int64) *Batch {
|
docs(session): add missing full stop (#<I>)
...for full sentence comment. This makes the comment consistent with the
rest of the documentation.
|
diff --git a/ExternalModule.php b/ExternalModule.php
index <HASH>..<HASH> 100644
--- a/ExternalModule.php
+++ b/ExternalModule.php
@@ -245,7 +245,7 @@ class ExternalModule extends Module implements iExternalModule
if(!isset($this->vendor)) {
// Generate vendor from namespace
$reflector = new \ReflectionClass(get_class($this));
- $vendor = str_replace('samson\\', '', $reflector->getNamespaceName());
+ $vendor = str_replace( '\\', '_', str_replace('samson\\', '', $reflector->getNamespaceName()));
}
// Default license
|
Changed composer @name field generation to support subnamespaces
|
diff --git a/app/models/dj_mon/dj_report.rb b/app/models/dj_mon/dj_report.rb
index <HASH>..<HASH> 100644
--- a/app/models/dj_mon/dj_report.rb
+++ b/app/models/dj_mon/dj_report.rb
@@ -82,8 +82,8 @@ module DjMon
end
private
- def l_datetime date
- date.present? ? I18n.l(date) : ""
+ def l_datetime time
+ time.present? ? time.strftime("%b %d %H:%M:%S") : ""
end
end
|
format time in a fixed format, instead of the localized one
|
diff --git a/demo/boot.php b/demo/boot.php
index <HASH>..<HASH> 100644
--- a/demo/boot.php
+++ b/demo/boot.php
@@ -15,11 +15,9 @@
$pinterest->auth->setOAuthToken($token->access_token);
setcookie("access_token", $token->access_token);
- }
- else if (isset($_GET["access_token"])) {
+ } else if (isset($_GET["access_token"])) {
$pinterest->auth->setOAuthToken($_GET["access_token"]);
- }
- else if (isset($_COOKIE["access_token"])) {
+ } else if (isset($_COOKIE["access_token"])) {
$pinterest->auth->setOAuthToken($_COOKIE["access_token"]);
}
|
Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on <URL>
|
diff --git a/addok/debug.py b/addok/debug.py
index <HASH>..<HASH> 100644
--- a/addok/debug.py
+++ b/addok/debug.py
@@ -250,10 +250,10 @@ class Cli(object):
if not doc:
print(red('Not found.'))
return
- self._print_field_index_details(doc[b'name'].decode(), _id)
- self._print_field_index_details(doc[b'postcode'].decode(), _id)
- self._print_field_index_details(doc[b'city'].decode(), _id)
- self._print_field_index_details(doc[b'context'].decode(), _id)
+ for field in config.FIELDS:
+ key = field['key'].encode()
+ if key in doc:
+ self._print_field_index_details(doc[key].decode(), _id)
def do_bestscore(self, word):
"""Return document linked to word with higher score.
|
Loop over config.FIELDS in debug INDEX command
|
diff --git a/security/src/main/java/org/jboss/as/security/service/SecurityActions.java b/security/src/main/java/org/jboss/as/security/service/SecurityActions.java
index <HASH>..<HASH> 100644
--- a/security/src/main/java/org/jboss/as/security/service/SecurityActions.java
+++ b/security/src/main/java/org/jboss/as/security/service/SecurityActions.java
@@ -43,7 +43,7 @@ class SecurityActions {
try {
return AccessController.doPrivileged(new PrivilegedExceptionAction<ModuleClassLoader>() {
public ModuleClassLoader run() throws ModuleLoadException {
- ModuleLoader loader = Module.getCurrentModuleLoader();
+ ModuleLoader loader = Module.getCallerModuleLoader();
ModuleIdentifier identifier = ModuleIdentifier.fromString(moduleSpec);
return loader.loadModule(identifier).getClassLoader();
}
|
Getting rid of deprecated method
|
diff --git a/cmd/rqlited/main.go b/cmd/rqlited/main.go
index <HASH>..<HASH> 100644
--- a/cmd/rqlited/main.go
+++ b/cmd/rqlited/main.go
@@ -139,6 +139,7 @@ func main() {
// Configure logging and pump out initial message.
log.SetFlags(log.LstdFlags)
+ log.SetOutput(os.Stderr)
log.SetPrefix("[rqlited] ")
log.Printf("rqlited starting, version %s, commit %s, branch %s", version, commit, branch)
log.Printf("architecture target is %s, operating system target is %s", runtime.GOARCH, runtime.GOOS)
|
main code should also log to stderr
|
diff --git a/src/Router.php b/src/Router.php
index <HASH>..<HASH> 100644
--- a/src/Router.php
+++ b/src/Router.php
@@ -206,13 +206,13 @@ class Router extends Core
$sGets = str_replace("index.php?", "", $sGets);
parse_str($sGets, $output);
- $_GET['NAME_CONTROLLER'] = !empty($output['NAME_CONTROLLER'])?$output['NAME_CONTROLLER']:$routerConfig->get('NAME_CONTROLLER');;
- $_GET['NAME_MODEL'] = !empty($output['NAME_MODEL'])?$output['NAME_MODEL']:$routerConfig->get('NAME_MODEL');;
+ $_GET['task'] = !empty($output['task'])?$output['task']:$routerConfig->get('NAME_CONTROLLER');;
+ $_GET['action'] = !empty($output['action'])?$output['action']:$routerConfig->get('NAME_MODEL');;
}
}
-
+
private function parseUrl($sRequest){
$sVars = null;
foreach($this->aRoutingParse AS $k => $v){
|
Bugfix router without friendlyUrl
|
diff --git a/CGRtools/reactor.py b/CGRtools/reactor.py
index <HASH>..<HASH> 100644
--- a/CGRtools/reactor.py
+++ b/CGRtools/reactor.py
@@ -20,7 +20,7 @@
from collections import defaultdict
from functools import reduce
from itertools import chain, count, islice, permutations, product
-from logging import warning
+from logging import warning, info
from operator import or_
from .containers import QueryContainer, QueryCGRContainer, MoleculeContainer, CGRContainer, ReactionContainer
@@ -317,6 +317,8 @@ class Reactor:
if intersection:
mapping = {k: v for k, v in zip(intersection, count(max(checked_atoms) + 1))}
structure = structure.remap(mapping, copy=True)
+ info("some atoms in input structures had the same numbers.\n"
+ f"atoms {list(mapping)} were remapped to {list(mapping.values())}")
checked_atoms.update(structure.atoms_numbers)
checked.append(structure)
return checked
|
logging info added (#<I>)
* logging info added
|
diff --git a/src/crypto/store/indexeddb-crypto-store.js b/src/crypto/store/indexeddb-crypto-store.js
index <HASH>..<HASH> 100644
--- a/src/crypto/store/indexeddb-crypto-store.js
+++ b/src/crypto/store/indexeddb-crypto-store.js
@@ -312,6 +312,7 @@ export class IndexedDBCryptoStore {
* @param {*} txn An active transaction. See doTxn().
* @param {function(string)} func Called with the private key
* @param {string} type A key type
+ * @returns {Promise} a promise
*/
async getCrossSigningPrivateKey(txn, func, type) {
return this._backend.getCrossSigningPrivateKey(txn, func, type);
@@ -333,6 +334,7 @@ export class IndexedDBCryptoStore {
* @param {*} txn An active transaction. See doTxn().
* @param {string} type The type of cross-signing private key to store
* @param {string} key keys object as getCrossSigningKeys()
+ * @returns {Promise} a promise
*/
storeCrossSigningPrivateKey(txn, type, key) {
return this._backend.storeCrossSigningPrivateKey(txn, type, key);
|
there's some days that the linter and i, we just really don't see eye-to-eye
|
diff --git a/galpy/potential_src/TwoPowerSphericalPotential.py b/galpy/potential_src/TwoPowerSphericalPotential.py
index <HASH>..<HASH> 100644
--- a/galpy/potential_src/TwoPowerSphericalPotential.py
+++ b/galpy/potential_src/TwoPowerSphericalPotential.py
@@ -420,6 +420,7 @@ class JaffePotential(TwoPowerIntegerSphericalPotential):
self.beta= 4
if normalize:
self.normalize(normalize)
+ self.hasC= True
return None
def _evaluate(self,R,z,phi=0.,t=0.,dR=0,dphi=0):
|
added C implementation of JaffePotential
|
diff --git a/scripts/release/steps/post-publish-steps.js b/scripts/release/steps/post-publish-steps.js
index <HASH>..<HASH> 100644
--- a/scripts/release/steps/post-publish-steps.js
+++ b/scripts/release/steps/post-publish-steps.js
@@ -14,7 +14,7 @@ const EDIT_URL = `https://github.com/${SCHEMA_REPO}/edit/master/${SCHEMA_PATH}`;
// Any optional or manual step can be warned in this script.
async function checkSchema() {
- const schema = await execa.stdout("node scripts/generate-schema.js");
+ const schema = await execa.stdout("node", ["scripts/generate-schema.js"]);
const remoteSchema = await logPromise(
"Checking current schema in SchemaStore",
fetch(RAW_URL)
|
chore(scripts): fix checkSchema command
|
diff --git a/lib/rest-core/middleware.rb b/lib/rest-core/middleware.rb
index <HASH>..<HASH> 100644
--- a/lib/rest-core/middleware.rb
+++ b/lib/rest-core/middleware.rb
@@ -10,7 +10,7 @@ module RestCore::Middleware
mod.send(:include, RestCore)
mod.send(:attr_reader, :app)
return unless mod.respond_to?(:members)
- accessors = mod.members.map{ |member| <<-RUBY }.join("\n")
+ src = mod.members.map{ |member| <<-RUBY }
def #{member} env
if env.key?('#{member}')
env['#{member}']
@@ -24,12 +24,15 @@ module RestCore::Middleware
args = [:app] + mod.members
args_list = args.join(', ')
ivar_list = args.map{ |a| "@#{a}" }.join(', ')
- initialize = <<-RUBY
+ src << <<-RUBY
def initialize #{args_list}
#{ivar_list} = #{args_list}
end
+ self
RUBY
- mod.module_eval("#{accessors}\n#{initialize}")
+ accessor = Module.new.module_eval(src.join("\n"))
+ mod.const_set(:Accessor, accessor)
+ mod.send(:include, accessor)
end
def call env ; app.call(env) ; end
|
middleware.rb: create Accessor to make initialize overridable
|
diff --git a/src/main/javascript/webpack/CopyAssets.js b/src/main/javascript/webpack/CopyAssets.js
index <HASH>..<HASH> 100644
--- a/src/main/javascript/webpack/CopyAssets.js
+++ b/src/main/javascript/webpack/CopyAssets.js
@@ -61,6 +61,11 @@ function getCopyPatterns(destination, projectRoot)
force: true
},
{
+ from: path.resolve(projectRoot, 'src', 'main', 'docs', 'README.md'),
+ to: path.join(projectRoot, destination, 'README.md'),
+ force: true
+ },
+ {
from: path.resolve(projectRoot, 'manifest.json'),
to: path.join(projectRoot, destination, 'manifest.json'),
force: true
|
copy src/docs/README.md to bundle root
|
diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb
index <HASH>..<HASH> 100644
--- a/lib/ohai/plugins/linux/platform.rb
+++ b/lib/ohai/plugins/linux/platform.rb
@@ -95,7 +95,7 @@ elsif lsb[:id] =~ /ScientificSL/i
platform "scientific"
platform_version lsb[:release]
elsif lsb[:id] =~ /XenServer/i
- platform " xenserver"
+ platform "xenserver"
platform_version lsb[:release]
elsif lsb[:id] # LSB can provide odd data that changes between releases, so we currently fall back on it rather than dealing with its subtleties
platform lsb[:id].downcase
@@ -108,7 +108,7 @@ case platform
platform_family "debian"
when /fedora/
platform_family "fedora"
- when /oracle/, /centos/, /redhat/, /scientific/, /enterprise/, /amazon/, /xenserver/
+ when /oracle/, /centos/, /redhat/, /scientific/, /enterpriseenterprise/, /amazon/, /xenserver/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID"
platform_family "rhel"
when /suse/
platform_family "suse"
|
Removed an additional space and reverted the name enterprise to enterpriseenterprise. Also added a comment to inform that this is oracle's LSB "distributor ID"
|
diff --git a/tests/Backend/FileTest.php b/tests/Backend/FileTest.php
index <HASH>..<HASH> 100644
--- a/tests/Backend/FileTest.php
+++ b/tests/Backend/FileTest.php
@@ -85,4 +85,23 @@ class FileTest extends \PHPUnit_Framework_TestCase
$this->assertLessThan(time() + 550, $contents['lifetime']);
}
+ /**
+ * @dataProvider getTestDataForGetFilename
+ */
+ public function test_getFilename_shouldConstructFilenameFromId($id, $expectedFilename)
+ {
+ $this->assertEquals($expectedFilename, $this->cache->getFilename($id));
+ }
+
+ public function getTestDataForGetFilename()
+ {
+ $dir = realpath($this->getPath());
+
+ return [
+ ['genericid', $dir . '/genericid.php'],
+ ['id with space', $dir . '/id with space.php'],
+ ['id \/ with :"?_ spe<>cial cha|rs', $dir . '/id with _ special chars.php'],
+ ['with % allowed & special chars', $dir . '/with % allowed & special chars.php'],
+ ];
+ }
}
\ No newline at end of file
|
Adding unit test for getFilename() since it is public now.
|
diff --git a/src/system/modules/metamodels/dca/tl_metamodel_filtersetting.php b/src/system/modules/metamodels/dca/tl_metamodel_filtersetting.php
index <HASH>..<HASH> 100644
--- a/src/system/modules/metamodels/dca/tl_metamodel_filtersetting.php
+++ b/src/system/modules/metamodels/dca/tl_metamodel_filtersetting.php
@@ -64,7 +64,7 @@ $GLOBALS['TL_DCA']['tl_metamodel_filtersetting'] = array
(
'label' => &$GLOBALS['TL_LANG']['MSC']['backBT'],
// TODO: this is an evil hack, replace with something better.
- 'href' => str_replace(array('contao/main.php?do=metamodel', $this->Environment->url), '', $this->getReferer(false, 'tl_metamodel_filter')),
+ 'href' => str_replace(array('contao/main.php?do=metamodels', $this->Environment->url), '', $this->getReferer(false, 'tl_metamodel_filter')),
'class' => 'header_back',
'attributes' => 'onclick="Backend.getScrollOffset();"'
)
|
Fix issue #<I> - back path in BE is calculated wrong and appends an "&s" at the end for each iteration.
|
diff --git a/inspire_schemas/builders.py b/inspire_schemas/builders.py
index <HASH>..<HASH> 100644
--- a/inspire_schemas/builders.py
+++ b/inspire_schemas/builders.py
@@ -645,7 +645,8 @@ class LiteratureBuilder(object):
material=None,
holder=None,
statement=None,
- url=None
+ url=None,
+ year=None
):
"""Add Copyright.
@@ -656,6 +657,8 @@ class LiteratureBuilder(object):
:type statement: string
:type url: string
+
+ :type year: int
"""
copyright = {}
for key in ('holder', 'statement', 'url'):
@@ -665,6 +668,9 @@ class LiteratureBuilder(object):
if material is not None:
copyright['material'] = material.lower()
+ if year is not None:
+ copyright['year'] = int(year)
+
self._append_to('copyright', copyright)
@filter_empty_parameters
|
builder: add `copyright.year` field to the builder
* Adds missing `copyright.year` field to the `builders.add_copyright`.
Closes #<I>
|
diff --git a/mod/resource/type/ims/resource.class.php b/mod/resource/type/ims/resource.class.php
index <HASH>..<HASH> 100644
--- a/mod/resource/type/ims/resource.class.php
+++ b/mod/resource/type/ims/resource.class.php
@@ -454,25 +454,13 @@ class resource_ims extends resource_base {
/// differs depending on some php variables.
echo "
<style type='text/css'>
- #ims-menudiv {
- position:absolute;
- left:5px;
- width:300px;
- overflow:auto;
- float:left;
- }
-
- #ims-containerdiv {
- width:100%;
-
- }
#ims-contentframe {
position:absolute;
";
if (!empty($this->parameters->navigationmenu)) {
- echo "left:310px;";
+ echo "left:260px;";
}
echo "
border:0px;
@@ -495,6 +483,7 @@ class resource_ims extends resource_base {
echo "</div></div></body></html>";
}
else {
+ /// Putting the footer inside one div to be able to handle it
print_footer();
}
|
Moving some harcoded styles in ims cp to standard
|
diff --git a/scanner.go b/scanner.go
index <HASH>..<HASH> 100644
--- a/scanner.go
+++ b/scanner.go
@@ -242,6 +242,14 @@ func scanMultilineBasicString(b []byte) ([]byte, bool, []byte, error) {
}
escaped = true
i++ // skip the next character
+ case '\r':
+ if len(b) < i+2 {
+ return nil, escaped, nil, newDecodeError(b[len(b):], `need a \n after \r`)
+ }
+ if b[i+1] != '\n' {
+ return nil, escaped, nil, newDecodeError(b[i:i+2], `need a \n after \r`)
+ }
+ i++ // skip the \n
}
}
diff --git a/unmarshaler_test.go b/unmarshaler_test.go
index <HASH>..<HASH> 100644
--- a/unmarshaler_test.go
+++ b/unmarshaler_test.go
@@ -2591,6 +2591,14 @@ world'`,
data: "A = \"\r\"",
},
{
+ desc: `carriage return inside basic multiline string`,
+ data: "a=\"\"\"\r\"\"\"",
+ },
+ {
+ desc: `carriage return at the trail of basic multiline string`,
+ data: "a=\"\"\"\r",
+ },
+ {
desc: `carriage return inside literal string`,
data: "A = '\r'",
},
|
Decoder: fail on unescaped \r not followed by \n (#<I>)
Fixes #<I>
|
diff --git a/drivers/ruby/lib/func.rb b/drivers/ruby/lib/func.rb
index <HASH>..<HASH> 100644
--- a/drivers/ruby/lib/func.rb
+++ b/drivers/ruby/lib/func.rb
@@ -11,6 +11,7 @@ module RethinkDB
:replace => :non_atomic, :update => :non_atomic, :insert => :upsert
}
@@opt_off = {
+ :replace => -1, :update => -1, :insert => -1, :delete => -1,
:reduce => -1, :between => -1, :grouped_map_reduce => -1,
:table => -1, :table_create => -1,
:get_all => -1, :eq_join => -1,
|
Made a change to the ruby driver that might make it support the durability option in insert, replace, update, and delete, properly. Or maybe not.
|
diff --git a/termtool.py b/termtool.py
index <HASH>..<HASH> 100644
--- a/termtool.py
+++ b/termtool.py
@@ -216,16 +216,14 @@ class Termtool(object):
return parser
- def _configure_logging(self, args):
- """Configure the `logging` module to the log level requested in the
- specified `argparse.Namespace` instance.
+ def configure(self, args):
+ """Configure the tool according to the command line arguments.
- The `args` namespace's ``verbosity`` should be a list of integers, the
- sum of which specifies which log level to use: sums from 0 to 4
- inclusive map to the standard `logging` log levels from
- `logging.CRITICAL` to `logging.DEBUG`. If the ``verbosity`` list sums
- to less than 0, level `logging.CRITICAL` is still used; for more than
- 4, `logging.DEBUG`.
+ Override this method to configure your tool with the values of any
+ other options it supports.
+
+ This implementation configures the `logging` module to the log level
+ requested by the user through the ``-v`` and ``-q`` options.
"""
log_level = args.loglevel
@@ -255,7 +253,7 @@ class Termtool(object):
parser = self.build_arg_parser()
args = parser.parse_args(args)
- self._configure_logging(args)
+ self.configure(args)
# The callable subcommand is parsed out as the "func" arg.
try:
|
Expose the configure() method as overridable
|
diff --git a/lib/perfectqueue/backend/rdb_compat.rb b/lib/perfectqueue/backend/rdb_compat.rb
index <HASH>..<HASH> 100644
--- a/lib/perfectqueue/backend/rdb_compat.rb
+++ b/lib/perfectqueue/backend/rdb_compat.rb
@@ -319,8 +319,6 @@ SQL
raise PreemptedError, "task key=#{key} does not exist or preempted."
elsif row[:created_at] == nil
raise PreemptedError, "task key=#{key} preempted."
- elsif row[:created_at] <= 0
- raise CancelRequestedError, "task key=#{key} is cancel requested."
else # row[:timeout] == next_timeout
# ok
end
diff --git a/spec/rdb_compat_backend_spec.rb b/spec/rdb_compat_backend_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rdb_compat_backend_spec.rb
+++ b/spec/rdb_compat_backend_spec.rb
@@ -329,8 +329,8 @@ describe Backend::RDBCompatBackend do
db.submit(key, 'test', nil, {})
db.cancel_request(key, options)
end
- it 'raises PreemptedError' do
- expect{db.heartbeat(task_token, 0, {})}.to raise_error(CancelRequestedError)
+ it 'returns nil' do
+ expect( db.heartbeat(task_token, 0, {}) ).to be_nil
end
end
end
|
Remove dead code in RDBCompatBackend#heartbeat
it updates rows WHERE id=key AND created_at IS NOT NULL,
but excluding created_at = 0, which means cancel_request.
Therefore the path won't be used.
|
diff --git a/pronto/serializers/_fastobo.py b/pronto/serializers/_fastobo.py
index <HASH>..<HASH> 100644
--- a/pronto/serializers/_fastobo.py
+++ b/pronto/serializers/_fastobo.py
@@ -205,11 +205,11 @@ class FastoboSerializer:
if r.symmetric:
frame.append(fastobo.typedef.IsSymmetricClause(True))
if r.transitive:
- frame.append(fastobo.typedef.IsTransitive(True))
+ frame.append(fastobo.typedef.IsTransitiveClause(True))
if r.functional:
- frame.append(fastobo.typedef.IsFunctional(True))
+ frame.append(fastobo.typedef.IsFunctionalClause(True))
if r.inverse_functional:
- frame.append(fastobo.typedef.IsInverseFunctional(True))
+ frame.append(fastobo.typedef.IsInverseFunctionalClause(True))
for superclass in sorted(r.relationships.get('is_a', ())):
frame.append(fastobo.typedef.IsAClause(fastobo.id.parse(superclass)))
for i in sorted(r.intersection_of):
|
Fix issues with typedef serialization in `FastoboSerializer`
|
diff --git a/spyderlib/widgets/externalshell/baseshell.py b/spyderlib/widgets/externalshell/baseshell.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/externalshell/baseshell.py
+++ b/spyderlib/widgets/externalshell/baseshell.py
@@ -229,6 +229,13 @@ class ExternalShellBase(QWidget):
if ask_for_arguments and not self.get_arguments():
self.set_running_state(False)
return
+ try:
+ self.disconnect(self.terminate_button, SIGNAL("clicked()"),
+ self.process.terminate)
+ self.disconnect(self.kill_button, SIGNAL("clicked()"),
+ self.process.terminate)
+ except:
+ pass
self.create_process()
def get_arguments(self):
|
External Console: Disconnect signals from kill and terminate buttons before creating a new process
Fixes issue <I>
- This was slowing down creating a new process after several times of killing
the previous one.
|
diff --git a/holoviews/plotting/renderer.py b/holoviews/plotting/renderer.py
index <HASH>..<HASH> 100644
--- a/holoviews/plotting/renderer.py
+++ b/holoviews/plotting/renderer.py
@@ -276,6 +276,8 @@ class Renderer(Exporter):
html = tag.format(src=src, mime_type=mime_type, css=css)
if comm and plot.comm is not None:
comm, msg_handler = self.comms[self.mode]
+ if msg_handler is None:
+ return html
msg_handler = msg_handler.format(comm_id=plot.comm.id)
return comm.template.format(init_frame=html,
msg_handler=msg_handler,
|
Ensure Renderer.html works with comms msg_handler (#<I>)
|
diff --git a/master/buildbot/process/build.py b/master/buildbot/process/build.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/process/build.py
+++ b/master/buildbot/process/build.py
@@ -184,13 +184,15 @@ class Build(properties.PropertiesMixin):
def setupSlaveBuilder(self, slavebuilder):
self.slavebuilder = slavebuilder
+ self.path_module = slavebuilder.slave.path_module
+
# navigate our way back to the L{buildbot.buildslave.BuildSlave}
# object that came from the config, and get its properties
buildslave_properties = slavebuilder.slave.properties
self.getProperties().updateFromProperties(buildslave_properties)
if slavebuilder.slave.slave_basedir:
self.setProperty("workdir",
- slavebuilder.slave.path_module.join(
+ self.path_module.join(
slavebuilder.slave.slave_basedir,
self.builder.config.slavebuilddir),
"slave")
|
Store a copy of the slave's path module on Build.
This is saves navigating to through the slavebuilder
and slave each time this is needed.
|
diff --git a/src/asphalt/core/context.py b/src/asphalt/core/context.py
index <HASH>..<HASH> 100644
--- a/src/asphalt/core/context.py
+++ b/src/asphalt/core/context.py
@@ -915,12 +915,12 @@ def current_context() -> Context:
def get_resource(type: Type[T_Resource], name: str = "default") -> T_Resource | None:
- """Shortcut for ``current_context().get_resource(...)."""
+ """Shortcut for ``current_context().get_resource(...)``."""
return current_context().get_resource(type, name)
def require_resource(type: Type[T_Resource], name: str = "default") -> T_Resource:
- """Shortcut for ``current_context().require_resource(...)."""
+ """Shortcut for ``current_context().require_resource(...)``."""
return current_context().require_resource(type, name)
|
Fixed missing backticks in some docstrings
|
diff --git a/test.py b/test.py
index <HASH>..<HASH> 100644
--- a/test.py
+++ b/test.py
@@ -7,6 +7,7 @@ from IPython.nbformat.current import read
from runipy.notebook_runner import NotebookRunner
+
class TestRunipy(unittest.TestCase):
maxDiff = 100000
|
test.py: Add another newline after imports.
|
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2008063002; // YYYYMMDD = date of the last version bump
+ $version = 2008070300; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0 dev (Build: 20080703)'; // Human-friendly version name
|
Bump to clean empty role names. MDL-<I>
|
diff --git a/lib/fastlane/actions/cert.rb b/lib/fastlane/actions/cert.rb
index <HASH>..<HASH> 100644
--- a/lib/fastlane/actions/cert.rb
+++ b/lib/fastlane/actions/cert.rb
@@ -16,7 +16,7 @@ module Fastlane
# This should be executed in the fastlane folder
values = params.first
- if values.kind_of?Array
+ unless values.kind_of?Hash
# Old syntax
values = {}
params.each do |val|
diff --git a/lib/fastlane/actions/sigh.rb b/lib/fastlane/actions/sigh.rb
index <HASH>..<HASH> 100644
--- a/lib/fastlane/actions/sigh.rb
+++ b/lib/fastlane/actions/sigh.rb
@@ -13,7 +13,8 @@ module Fastlane
require 'credentials_manager/appfile_config'
values = params.first
- if values.kind_of?Array
+
+ unless values.kind_of?Hash
# Old syntax
values = {}
params.each do |val|
|
Added support for hashes and arrays when using cert and sigh integration
|
diff --git a/lib/coverband/collectors/view_tracker.rb b/lib/coverband/collectors/view_tracker.rb
index <HASH>..<HASH> 100644
--- a/lib/coverband/collectors/view_tracker.rb
+++ b/lib/coverband/collectors/view_tracker.rb
@@ -130,7 +130,7 @@ module Coverband
redis_store.set(tracker_time_key, Time.now.to_i) unless @one_time_timestamp || tracker_time_key_exists?
@one_time_timestamp = true
reported_time = Time.now.to_i
- @views_to_record.each do |file|
+ @views_to_record.to_a.each do |file|
redis_store.hset(tracker_key, file, reported_time)
end
@views_to_record.clear
|
avoid race condition between threads reporting views and adding to them
|
diff --git a/lib/mongoid/composable.rb b/lib/mongoid/composable.rb
index <HASH>..<HASH> 100644
--- a/lib/mongoid/composable.rb
+++ b/lib/mongoid/composable.rb
@@ -84,6 +84,7 @@ module Mongoid
Validatable,
Equality,
Association::Referenced::Syncable,
+ Association::Macros,
ActiveModel::Model,
ActiveModel::Validations
]
diff --git a/spec/mongoid/association/macros_spec.rb b/spec/mongoid/association/macros_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mongoid/association/macros_spec.rb
+++ b/spec/mongoid/association/macros_spec.rb
@@ -20,6 +20,26 @@ describe Mongoid::Association::Macros do
klass.validators.clear
end
+ describe 'Model loading' do
+
+ let(:model_associations) do
+ class TestModel
+ include Mongoid::Document
+ field :associations
+ end
+ end
+
+ after do
+ Object.send(:remove_const, :TestModel)
+ end
+
+ it 'prohibits the use of :associations as an attribute' do
+ expect {
+ model_associations
+ }.to raise_exception(Mongoid::Errors::InvalidField)
+ end
+ end
+
describe ".embedded_in" do
it "defines the macro" do
|
MONGOID-<I> Don't allow Relations::Marcros methods to be field names
|
diff --git a/packages/react-ui-components/src/index.js b/packages/react-ui-components/src/index.js
index <HASH>..<HASH> 100644
--- a/packages/react-ui-components/src/index.js
+++ b/packages/react-ui-components/src/index.js
@@ -1,3 +1,4 @@
+/* eslint-disable camelcase, react/jsx-pascal-case */
import Badge from './Badge/index';
import Bar from './Bar/index';
import Button from './Button/index';
|
Disable camelcase linting for index.js
|
diff --git a/proxy/proxy.go b/proxy/proxy.go
index <HASH>..<HASH> 100644
--- a/proxy/proxy.go
+++ b/proxy/proxy.go
@@ -71,10 +71,14 @@ func Copy(to net.Conn, from net.Conn, complete chan bool) {
complete <- true
}
-func CloseWrite(rwc net.Conn) {
- if tcpc, ok := rwc.(*net.TCPConn); ok {
- tcpc.CloseWrite()
- } else if unixc, ok := rwc.(*net.UnixConn); ok {
- unixc.CloseWrite()
+func CloseWrite(conn net.Conn) {
+ cwConn, ok := conn.(interface {
+ CloseWrite() error
+ })
+
+ if ok {
+ cwConn.CloseWrite()
+ } else {
+ fmt.Fprintf(os.Stderr, "Connection doesn't implement CloseWrite()\n")
}
}
|
Proxy calls CloseWrite() iff it's implemented by the connection
|
diff --git a/src/HelpScout/model/Conversation.php b/src/HelpScout/model/Conversation.php
index <HASH>..<HASH> 100644
--- a/src/HelpScout/model/Conversation.php
+++ b/src/HelpScout/model/Conversation.php
@@ -77,7 +77,7 @@ class Conversation {
$this->bccList = isset($data->bcc) ? $data->bcc : null;
$this->tags = isset($data->tags) ? $data->tags : null;
- if ($data->closedBy) {
+ if (isset($data->closedBy)) {
$this->closedBy = new \HelpScout\model\ref\PersonRef($data->closedBy);
}
|
Add an `isset` wrapper around the `$data->closedBy` in `Conversation` to avoid errors
|
diff --git a/setuptools_markdown.py b/setuptools_markdown.py
index <HASH>..<HASH> 100644
--- a/setuptools_markdown.py
+++ b/setuptools_markdown.py
@@ -18,7 +18,10 @@ def long_description_markdown_filename(dist, attr, value):
setup_py_path = inspect.getsourcefile(frame)
markdown_filename = os.path.join(os.path.dirname(setup_py_path), value)
logger.debug('markdown_filename = %r', markdown_filename)
- output = pypandoc.convert(markdown_filename, 'rst')
+ try:
+ output = pypandoc.convert(markdown_filename, 'rst')
+ except OSError:
+ output = open(markdown_filename).read()
dist.metadata.long_description = output
|
Don't fail if pandoc is not installed
Closes #2
|
diff --git a/public/js/plugins/plugins.edition.js b/public/js/plugins/plugins.edition.js
index <HASH>..<HASH> 100644
--- a/public/js/plugins/plugins.edition.js
+++ b/public/js/plugins/plugins.edition.js
@@ -15,7 +15,17 @@ var melisPluginEdition = (function($, window) {
$("body").on("click", ".m-trash-handle", removePlugins);
- $body.on("click", "#pluginModalBtnApply", submitPluginForms); // $body because it is modal and it's located in parent
+ // Checking parent body events handler to avoid multiple events of the button
+ var cerateEventHalder = true;
+ $.each($body.data("events").click, function(i, val){
+ if (val.selector == "#pluginModalBtnApply") {
+ cerateEventHalder = false;
+ }
+ });
+
+ if (cerateEventHalder) {
+ $body.on("click", "#pluginModalBtnApply", submitPluginForms); // $body because it is modal and it's located in parent
+ }
$("body").on("focus", ".melis-ui-outlined .melis-editable", function() {
$(this).closest(".melis-ui-outlined").addClass("melis-focus");
|
Plugin modal apply button mutliple request issue fixed
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -56,6 +56,7 @@ setup(
# https://packaging.python.org/en/latest/requirements.html
install_requires=['numpy',
'pandas',
+ 'pygments',
'requests[security]>=2.6',
],
)
|
Add pygments to install_requires list
Add pygments to install_requires list to fix import error
|
diff --git a/rest/response.go b/rest/response.go
index <HASH>..<HASH> 100644
--- a/rest/response.go
+++ b/rest/response.go
@@ -29,12 +29,17 @@ type ResponseWriter interface {
WriteHeader(int)
}
+// This allows to customize the field name used in the error response payload.
+// It defaults to "Error" for compatibility reason, but can be changed before starting the server.
+// eg: rest.ErrorFieldName = "errorMessage"
+var ErrorFieldName = "Error"
+
// Error produces an error response in JSON with the following structure, '{"Error":"My error message"}'
// The standard plain text net/http Error helper can still be called like this:
// http.Error(w, "error message", code)
func Error(w ResponseWriter, error string, code int) {
w.WriteHeader(code)
- err := w.WriteJson(map[string]string{"Error": error})
+ err := w.WriteJson(map[string]string{ErrorFieldName: error})
if err != nil {
panic(err)
}
|
Add the ability to customize the field name in the error response.
"Error", capitalized, was not a good choice, but will stay the default
until the next major version (strict compat, see semver.org)
This variable allows the user to customize this field name.
|
diff --git a/src/ai/backend/common/logging.py b/src/ai/backend/common/logging.py
index <HASH>..<HASH> 100644
--- a/src/ai/backend/common/logging.py
+++ b/src/ai/backend/common/logging.py
@@ -340,6 +340,8 @@ class Logger():
}
def __enter__(self):
+ if is_active.get():
+ raise RuntimeError('You cannot activate two or more loggers at the same time.')
self.log_config['handlers']['relay'] = {
'class': 'ai.backend.common.logging.RelayHandler',
'level': self.daemon_config['level'],
|
Prevent overlapping of loggers (lablup/backend.ai#<I>)
|
diff --git a/core/src/test/java/org/bitcoinj/utils/AppDataDirectoryTest.java b/core/src/test/java/org/bitcoinj/utils/AppDataDirectoryTest.java
index <HASH>..<HASH> 100644
--- a/core/src/test/java/org/bitcoinj/utils/AppDataDirectoryTest.java
+++ b/core/src/test/java/org/bitcoinj/utils/AppDataDirectoryTest.java
@@ -34,7 +34,7 @@ public class AppDataDirectoryTest {
final String appName = "bitcoinj";
String path = AppDataDirectory.get(appName).toString();
if (Utils.isWindows()) {
- assertEquals("Path wrong on Mac", winPath(appName), path);
+ assertEquals("Path wrong on Windows", winPath(appName), path);
} else if (Utils.isMac()) {
assertEquals("Path wrong on Mac", macPath(appName), path);
} else if (Utils.isLinux()) {
@@ -49,7 +49,7 @@ public class AppDataDirectoryTest {
final String appName = "Bitcoin";
String path = AppDataDirectory.get(appName).toString();
if (Utils.isWindows()) {
- assertEquals("Path wrong on Mac", winPath(appName), path);
+ assertEquals("Path wrong on Windows", winPath(appName), path);
} else if (Utils.isMac()) {
assertEquals("Path wrong on Mac", macPath(appName), path);
} else if (Utils.isLinux()) {
|
AppDataDirectoryTest: Fix two assert messages.
|
diff --git a/collectors/assets.php b/collectors/assets.php
index <HASH>..<HASH> 100644
--- a/collectors/assets.php
+++ b/collectors/assets.php
@@ -227,8 +227,8 @@ class QM_Collector_Assets extends QM_Collector {
/** This filter is documented in wp-includes/class.wp-scripts.php */
$source = apply_filters( "{$loader}_loader_src", $src, $dependency->handle );
- $host = (string) wp_parse_url( $source, PHP_URL_HOST );
- $scheme = (string) wp_parse_url( $source, PHP_URL_SCHEME );
+ $host = (string) parse_url( $source, PHP_URL_HOST );
+ $scheme = (string) parse_url( $source, PHP_URL_SCHEME );
$http_host = $data['host'];
if ( empty( $host ) && ! empty( $http_host ) ) {
@@ -244,7 +244,7 @@ class QM_Collector_Assets extends QM_Collector {
if ( is_wp_error( $source ) ) {
$error_data = $source->get_error_data();
if ( $error_data && isset( $error_data['src'] ) ) {
- $host = (string) wp_parse_url( $error_data['src'], PHP_URL_HOST );
+ $host = (string) parse_url( $error_data['src'], PHP_URL_HOST );
}
} elseif ( empty( $source ) ) {
$source = '';
|
Avoid using `wp_parse_url()` as it was only introduced in WP <I>. See #<I>.
|
diff --git a/simuvex/procedures/syscalls/__init__.py b/simuvex/procedures/syscalls/__init__.py
index <HASH>..<HASH> 100644
--- a/simuvex/procedures/syscalls/__init__.py
+++ b/simuvex/procedures/syscalls/__init__.py
@@ -36,10 +36,11 @@ class SimStateSystem(simuvex.SimStatePlugin):
self.state.add_constraints(*constraints)
return expr
- @simuvex.helpers.concretize_args
def write(self, fd, content, length, pos=None):
# TODO: error handling
# TODO: symbolic support
+ fd = self.state.make_concrete_int(fd)
+ length = self.state.make_concrete_int(fd)
return self.files[fd].write(content, length, pos)
@simuvex.helpers.concretize_args
|
don't concretize content on write
|
diff --git a/lib/tire/model/import.rb b/lib/tire/model/import.rb
index <HASH>..<HASH> 100644
--- a/lib/tire/model/import.rb
+++ b/lib/tire/model/import.rb
@@ -15,6 +15,7 @@ module Tire
def import options={}, &block
options = { :method => 'paginate' }.update options
+ index = options[:index] ? Tire::Index.new(options.delete(:index)) : self.index
index.import klass, options, &block
end
diff --git a/test/unit/model_import_test.rb b/test/unit/model_import_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/model_import_test.rb
+++ b/test/unit/model_import_test.rb
@@ -60,7 +60,11 @@ module Tire
# Add 1 to every "document" and return them
documents.map { |d| d + 1 }
end
+ end
+ should "store the documents in a different index" do
+ Tire::Index.expects(:new).with('new_index').returns( mock('index') { expects(:import) } )
+ ImportModel.import :index => 'new_index'
end
end
|
[ACTIVEMODEL] Allow passing `:index` option to `MyModel.import`
Allows to index the data into a different index:
Article.import index: 'new_articles'
|
diff --git a/allure-cli/src/main/java/ru/yandex/qatools/allure/AllureCli.java b/allure-cli/src/main/java/ru/yandex/qatools/allure/AllureCli.java
index <HASH>..<HASH> 100644
--- a/allure-cli/src/main/java/ru/yandex/qatools/allure/AllureCli.java
+++ b/allure-cli/src/main/java/ru/yandex/qatools/allure/AllureCli.java
@@ -37,7 +37,7 @@ public class AllureCli {
@Arguments(title = "input directories",
description = "A list of input directories to be processed")
- public List<String> inputPaths;
+ public List<String> inputPaths = new ArrayList<>();
@Option(name = {"--version"})
public boolean version;
|
Fixed NPE in AllureCLI
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.