diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
---|---|
diff --git a/MEA_package/ProgramFiles/regression_tests.py b/MEA_package/ProgramFiles/regression_tests.py
index <HASH>..<HASH> 100755
--- a/MEA_package/ProgramFiles/regression_tests.py
+++ b/MEA_package/ProgramFiles/regression_tests.py
@@ -28,9 +28,6 @@ def create_options_parser():
# install it
if os.path.isfile('/usr/local/lib/libsundials_cvode.a'):
return "--sd2=/usr/local/lib/ --sd1=/usr/local/include/"
- # This is where it is stored in jenkins
- elif os.path.isfile('/usr/share/lib/libsundials_cvode.a'):
- return "--sd2=/usr/share/lib/ --sd1=/usr/local/include/"
else:
return None
|
removed the /usr/share sundials loc as we dont need it
|
diff --git a/manticore/platforms/linux.py b/manticore/platforms/linux.py
index <HASH>..<HASH> 100644
--- a/manticore/platforms/linux.py
+++ b/manticore/platforms/linux.py
@@ -868,7 +868,7 @@ class Linux(Platform):
for mpath in env['LD_LIBRARY_PATH'].split(":"):
interpreter_path_filename = os.path.join(mpath, os.path.basename(interpreter_filename))
logger.info("looking for interpreter %s", interpreter_path_filename)
- if os.path.exists(interpreter_filename):
+ if os.path.exists(interpreter_path_filename):
interpreter = ELFFile(open(interpreter_path_filename))
break
break
|
Fixed variable name typo. Issue #<I>. (#<I>)
|
diff --git a/src/client/websocket/packets/WebSocketPacketManager.js b/src/client/websocket/packets/WebSocketPacketManager.js
index <HASH>..<HASH> 100644
--- a/src/client/websocket/packets/WebSocketPacketManager.js
+++ b/src/client/websocket/packets/WebSocketPacketManager.js
@@ -95,6 +95,11 @@ class WebSocketPacketManager {
this.ws.client.emit('debug', 'Heartbeat acknowledged');
}
+ if (packet.op === Constants.OPCodes.HEARTBEAT) {
+ this.client.ws.send({ op: Constants.OPCodes.HEARTBEAT_ACK });
+ this.ws.client.emit('debug', 'ACKed gateway heartbeat!');
+ }
+
if (this.ws.status === Constants.Status.RECONNECTING) {
this.ws.reconnecting = false;
this.ws.checkIfReady();
|
"knock, knock. who's there. discord, lol" (#<I>)
|
diff --git a/src/main/java/com/microsoft/aad/adal4j/AuthenticationAuthority.java b/src/main/java/com/microsoft/aad/adal4j/AuthenticationAuthority.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/microsoft/aad/adal4j/AuthenticationAuthority.java
+++ b/src/main/java/com/microsoft/aad/adal4j/AuthenticationAuthority.java
@@ -37,7 +37,7 @@ class AuthenticationAuthority {
private final static String[] TRUSTED_HOST_LIST = { "login.windows.net",
"login.chinacloudapi.cn", "login-us.microsoftonline.com", "login.microsoftonline.de",
- "login.microsoftonline.com" };
+ "login.microsoftonline.com", "login.microsoftonline.us" };
private final static String TENANTLESS_TENANT_NAME = "common";
private final static String AUTHORIZE_ENDPOINT_TEMPLATE = "https://{host}/{tenant}/oauth2/authorize";
private final static String DISCOVERY_ENDPOINT = "common/discovery/instance";
|
adding login.microsoftonline.us to Authority trusted hosts list
|
diff --git a/src/Watson/Sitemap/Sitemap.php b/src/Watson/Sitemap/Sitemap.php
index <HASH>..<HASH> 100644
--- a/src/Watson/Sitemap/Sitemap.php
+++ b/src/Watson/Sitemap/Sitemap.php
@@ -136,7 +136,17 @@ class Sitemap
*/
public function xml()
{
- return $this->renderSitemap()->getOriginalContent();
+ return $this->render()->getOriginalContent();
+ }
+
+ /**
+ * Get the formatted sitemap index.
+ *
+ * @return string
+ */
+ public function xmlIndex()
+ {
+ return $this->index()->getOriginalContent();
}
/**
|
Add method to get original content from index (#<I>)
|
diff --git a/lib/faker/business.rb b/lib/faker/business.rb
index <HASH>..<HASH> 100644
--- a/lib/faker/business.rb
+++ b/lib/faker/business.rb
@@ -10,7 +10,7 @@ module Faker
end
def credit_card_expiry_date
- ::Date.today + (365 * rand(1..4))
+ ::Date.today + (365 * (rand(4) + 1))
end
def credit_card_type
|
fixed for compatibility with ruby <I>
|
diff --git a/library/src/com/johnliu/swipefinish/core/SwipeFinishActivity.java b/library/src/com/johnliu/swipefinish/core/SwipeFinishActivity.java
index <HASH>..<HASH> 100644
--- a/library/src/com/johnliu/swipefinish/core/SwipeFinishActivity.java
+++ b/library/src/com/johnliu/swipefinish/core/SwipeFinishActivity.java
@@ -8,6 +8,13 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
+/**
+ * SwipeFinishActivity.
+ * <p>
+ * Base activity for swiping to finish activity.
+ *
+ * Created by John on 2014-6-19
+ */
public class SwipeFinishActivity extends FragmentActivity {
SwipeFinishLayout swipeLayout;
|
Add some comments for SwipeFinshActivity.
|
diff --git a/controllers/FrontController.php b/controllers/FrontController.php
index <HASH>..<HASH> 100644
--- a/controllers/FrontController.php
+++ b/controllers/FrontController.php
@@ -221,9 +221,9 @@ class FrontController
$video = $this->download->getJSON($url, $format);
$client = new \GuzzleHttp\Client();
$stream = $client->request('GET', $video->url, array('stream'=>true));
- $response = $response->withHeader('Content-Disposition', 'inline; filename="'.$video->_filename.'"');
+ $response = $response->withHeader('Content-Disposition', 'attachment; filename="'.$video->_filename.'"');
$response = $response->withHeader('Content-Type', $stream->getHeader('Content-Type'));
- $response = $response->withHeader('Content-Length', $stream->getHeader('Content-Length'));
+ //$response = $response->withHeader('Content-Length', $stream->getHeader('Content-Length'));
if ($request->isGet()) {
$response = $response->withBody($stream->getBody());
}
|
Don't include Content-Length for now
|
diff --git a/telegram_handler/formatters.py b/telegram_handler/formatters.py
index <HASH>..<HASH> 100644
--- a/telegram_handler/formatters.py
+++ b/telegram_handler/formatters.py
@@ -32,7 +32,7 @@ class StyledFormatter(TelegramFormatter):
def __init__(self, *args, **kwargs):
if 'escape_message' in kwargs:
- self.escape_exception = kwargs.pop('escape_message')
+ self.escape_message = kwargs.pop('escape_message')
if 'escape_exception' in kwargs:
self.escape_exception = kwargs.pop('escape_exception')
super(StyledFormatter, self).__init__(*args, **kwargs)
|
Setting escape_message field missed
|
diff --git a/web/concrete/core/models/file.php b/web/concrete/core/models/file.php
index <HASH>..<HASH> 100644
--- a/web/concrete/core/models/file.php
+++ b/web/concrete/core/models/file.php
@@ -443,11 +443,14 @@ class Concrete5_Model_File extends Object {
if ($fvID == null) {
$fvID = $this->fvID; // approved version
}
-
- if (is_object($this->fv)) {
- return $this->fv;
+ $fv = CacheLocal::getEntry('file_versions', $this->getFileID() . ':' . $fvID);
+ if ($fv === -1) {
+ return false;
}
-
+ if ($fv) {
+ return $fv;
+ }
+
$db = Loader::db();
$row = $db->GetRow("select * from FileVersions where fvID = ? and fID = ?", array($fvID, $this->fID));
$row['fvAuthorName'] = $db->GetOne("select uName from Users where uID = ?", array($row['fvAuthorUID']));
@@ -456,7 +459,7 @@ class Concrete5_Model_File extends Object {
$row['fslID'] = $this->fslID;
$fv->setPropertiesFromArray($row);
- $this->fv = $fv;
+ CacheLocal::set('file_versions', $this->getFileID() . ':' . $fvID, $fv);
return $fv;
}
|
Fix Version Display in Dashboard
Fix version display in dashboard view.
`$this->fv` was storing on file version and caching that. This caused
the same version as the first one to always be returned.
Change to `CacheLocal::set()` `CacheLocal::getEntry()`
Former-commit-id: 4fd6fa<I>b2e<I>deeb<I>ff3cbb8c<I>cbf<I>fe0f
|
diff --git a/verisure/session.py b/verisure/session.py
index <HASH>..<HASH> 100644
--- a/verisure/session.py
+++ b/verisure/session.py
@@ -91,6 +91,7 @@ class Session(object):
self._request_cookies = None
# The login with stored cookies failed, try to get a new one
+ last_exception = None
for login_url in ['https://automation01.verisure.com/auth/login',
'https://automation02.verisure.com/auth/login']:
try:
@@ -103,11 +104,13 @@ class Session(object):
pickle.dump(response.cookies, f)
self._request_cookies = {'vid': response.cookies['vid']}
self._get_installations()
+ return
except requests.exceptions.RequestException as ex:
raise LoginError(ex)
except Exception as ex:
- print(ex)
- pass
+ last_exception = ex
+
+ raise LoginError(last_exception)
def _get_installations(self):
""" Get information about installations """
|
Raise on login error, after all attempts are exhausted (#<I>)
|
diff --git a/lib/nucleon/action/node/provision.rb b/lib/nucleon/action/node/provision.rb
index <HASH>..<HASH> 100644
--- a/lib/nucleon/action/node/provision.rb
+++ b/lib/nucleon/action/node/provision.rb
@@ -69,7 +69,7 @@ class Provision < Nucleon.plugin_class(:nucleon, :cloud_action)
end
end
end
- success('complete', { :provider => node.plugin_provider, :name => node.plugin_name }) if success
+ success('complete', { :provider => node.plugin_provider, :name => node.plugin_name, :time => Time.now.to_s }) if success
myself.status = code.provision_failure unless success
end
end
|
Adding time output variable to the provision node action provider.
|
diff --git a/lib/iso/iban.rb b/lib/iso/iban.rb
index <HASH>..<HASH> 100644
--- a/lib/iso/iban.rb
+++ b/lib/iso/iban.rb
@@ -2,6 +2,7 @@
require 'iso/iban/specification'
require 'iso/iban/version'
+require 'yaml'
module ISO
|
Require yaml.
|
diff --git a/django_jenkins/runner.py b/django_jenkins/runner.py
index <HASH>..<HASH> 100644
--- a/django_jenkins/runner.py
+++ b/django_jenkins/runner.py
@@ -136,10 +136,11 @@ class CITestSuiteRunner(DiscoverRunner):
"""
Continuous integration test runner
"""
- def __init__(self, output_dir, with_reports=True, **kwargs):
+ def __init__(self, output_dir, with_reports=True, debug=False, **kwargs):
super(CITestSuiteRunner, self).__init__(**kwargs)
self.with_reports = with_reports
self.output_dir = output_dir
+ self.debug = debug
def setup_test_environment(self, **kwargs):
super(CITestSuiteRunner, self).setup_test_environment()
@@ -164,7 +165,7 @@ class CITestSuiteRunner(DiscoverRunner):
def run_suite(self, suite, **kwargs):
signals.before_suite_run.send(sender=self)
- result = TextTestRunner(buffer=True,
+ result = TextTestRunner(buffer=not self.debug,
resultclass=EXMLTestResult,
verbosity=self.verbosity).run(suite)
if self.with_reports:
|
Allow to use pdb under jenkins Close #<I>
|
diff --git a/great_expectations/data_context/datasource/databricks_generator.py b/great_expectations/data_context/datasource/databricks_generator.py
index <HASH>..<HASH> 100644
--- a/great_expectations/data_context/datasource/databricks_generator.py
+++ b/great_expectations/data_context/datasource/databricks_generator.py
@@ -1,4 +1,4 @@
-import datetime
+import time
import logging
from .batch_generator import BatchGenerator
@@ -38,6 +38,6 @@ class DatabricksTableGenerator(BatchGenerator):
return iter(
{
"query": query,
- "timestamp": datetime.datetime.timestamp(datetime.now())
+ "timestamp": time.time()
}
)
|
Update timestamp generation for databricks_generator
|
diff --git a/lib/fog/ibm/models/compute/server.rb b/lib/fog/ibm/models/compute/server.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/ibm/models/compute/server.rb
+++ b/lib/fog/ibm/models/compute/server.rb
@@ -150,7 +150,7 @@ module Fog
# Expires the instance immediately
def expire!
- expire_at(Time.now)
+ expire_at(Time.now + 5)
end
def image
|
[ibm] Set expire a few seconds in the future since it takes a while to process
|
diff --git a/ssllabs-scan.go b/ssllabs-scan.go
index <HASH>..<HASH> 100644
--- a/ssllabs-scan.go
+++ b/ssllabs-scan.go
@@ -391,19 +391,19 @@ func invokeGetRepeatedly(url string) (*http.Response, []byte, error) {
return resp, body, nil
} else {
- if err.Error() == "EOF" {
+ if strings.Contains(err.Error(), "EOF") {
// Server closed a persistent connection on us, which
// Go doesn't seem to be handling well. So we'll try one
// more time.
if retryCount > 5 {
- log.Fatalf("[ERROR] Too many HTTP requests (5) failed with EOF (ref#1)")
+ log.Fatalf("[ERROR] Too many HTTP requests (5) failed with EOF (ref#3)")
}
if logLevel >= LOG_DEBUG {
- log.Printf("[DEBUG] HTTP request failed with EOF (ref#1)")
+ log.Printf("[DEBUG] HTTP request failed with EOF (ref#3)")
}
} else {
- log.Fatalf("[ERROR] HTTP request failed: %v (ref#1)", err.Error())
+ log.Fatalf("[ERROR] HTTP request failed: %v (ref#3)", err.Error())
}
retryCount++
|
Fix retry on HTTP EOF.
|
diff --git a/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSession.java b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSession.java
index <HASH>..<HASH> 100644
--- a/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSession.java
+++ b/modeshape-jcr/src/main/java/org/modeshape/jcr/JcrSession.java
@@ -1256,14 +1256,21 @@ public class JcrSession implements org.modeshape.jcr.api.Session {
assert path == null ? true : path.isAbsolute() : "The path (if provided) must be absolute";
SecurityContext sec = context.getSecurityContext();
+ boolean hasPermission = true;
+
final String repositoryName = this.repository.repositoryName();
if (sec instanceof AuthorizationProvider) {
// Delegate to the security context ...
AuthorizationProvider authorizer = (AuthorizationProvider)sec;
- return authorizer.hasPermission(context, repositoryName, repositoryName, workspaceName, path, actions);
+ hasPermission = authorizer.hasPermission(context, repositoryName, repositoryName, workspaceName, path, actions);
+
+ if (hasPermission) {
+ hasPermission = acm.hasPermission(path, actions);
+ }
+
+ return hasPermission;
}
- boolean hasPermission = true;
if (sec instanceof AdvancedAuthorizationProvider) {
// Delegate to the security context ...
AdvancedAuthorizationProvider authorizer = (AdvancedAuthorizationProvider)sec;
|
MODE-<I>: Add permission checking using ACM within authorizer block
|
diff --git a/src/Response/Status.php b/src/Response/Status.php
index <HASH>..<HASH> 100644
--- a/src/Response/Status.php
+++ b/src/Response/Status.php
@@ -65,11 +65,11 @@ class Status implements ResponseInterface
switch ($payload) {
case 'OK':
case 'QUEUED':
- if (!isset(self::$$payload)) {
- self::$$payload = new self($payload);
+ if (isset(self::$$payload)) {
+ return self::$$payload;
}
- return self::$$payload;
+ return self::$$payload = new self($payload);
default:
return new self($payload);
|
Apply easy micro-optimization.
|
diff --git a/router/routes.go b/router/routes.go
index <HASH>..<HASH> 100644
--- a/router/routes.go
+++ b/router/routes.go
@@ -150,11 +150,12 @@ func (rm *RouteManager) Route(route *Route, logstream chan *Message) {
}
func (rm *RouteManager) RoutingFrom(containerID string) bool {
- routing := false
for _, router := range LogRouters.All() {
- routing = routing || router.RoutingFrom(containerID)
+ if router.RoutingFrom(containerID) {
+ return true
+ }
}
- return routing
+ return false
}
func (rm *RouteManager) Run() error {
|
Simplify and add early exit to RoutingFrom
|
diff --git a/xerox/darwin.py b/xerox/darwin.py
index <HASH>..<HASH> 100644
--- a/xerox/darwin.py
+++ b/xerox/darwin.py
@@ -14,7 +14,7 @@ def copy(string):
"""Copy given string into system clipboard."""
try:
subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE).communicate(str(unicode(string)))
- except Exception, why:
+ except Exception as why:
raise XcodeNotFound
return
@@ -24,6 +24,6 @@ def paste():
"""Returns system clipboard contents."""
try:
return unicode(commands.getoutput('pbpaste'))
- except Exception, why:
+ except Exception as why:
raise XcodeNotFound
diff --git a/xerox/linux.py b/xerox/linux.py
index <HASH>..<HASH> 100644
--- a/xerox/linux.py
+++ b/xerox/linux.py
@@ -13,13 +13,13 @@ def copy(string):
_cmd = ["xclip", "-selection", "clipboard"]
subprocess.Popen(_cmd, stdin=subprocess.PIPE).communicate(unicode(string))
return
- except Exception, why:
+ except Exception as why:
raise XclipNotFound
def paste():
"""Returns system clipboard contents."""
try:
return unicode(subprocess.Popen(["xclip", "-selection", "clipboard", "-o"], stdout=subprocess.PIPE).communicate()[0])
- except Exception, why:
+ except Exception as why:
raise XclipNotFound
|
Use `except Exception as why` syntax rather than `except Exception, why`
|
diff --git a/src/array.js b/src/array.js
index <HASH>..<HASH> 100644
--- a/src/array.js
+++ b/src/array.js
@@ -69,6 +69,9 @@ class RynoArray extends RynoObject {
// Public: Returns the current length of the array.
get length() { return this.__elements__.length; }
+ // Public: Returns the backing native array.
+ get native() { return this.__elements__; }
+
// Public: Element reference and assignment method. When given one argument, returns the item at
// the specified index. When passed, two arguments, the second argument is set as the item at the
// index indicated by the first.
|
Adds Array#native property.
|
diff --git a/test/actions/pulp3/orchestration/file_delete_test.rb b/test/actions/pulp3/orchestration/file_delete_test.rb
index <HASH>..<HASH> 100644
--- a/test/actions/pulp3/orchestration/file_delete_test.rb
+++ b/test/actions/pulp3/orchestration/file_delete_test.rb
@@ -9,7 +9,7 @@ class FileDeleteTest < ActiveSupport::TestCase
@repo.root.update_attributes(:url => 'http://test/test/')
create_repo(@repo, @master)
ForemanTasks.sync_task(
- ::Actions::Katello::Repository::MetadataGenerate, repo,
+ ::Actions::Katello::Repository::MetadataGenerate, @repo,
repository_creation: true)
ForemanTasks.sync_task(
::Actions::Pulp3::Orchestration::Repository::Delete, @repo, @master)
|
Fixes #<I> - repairs file delete test setup
|
diff --git a/lib/ways.js b/lib/ways.js
index <HASH>..<HASH> 100644
--- a/lib/ways.js
+++ b/lib/ways.js
@@ -35,11 +35,15 @@ module.exports = function(pattern, runner, destroyer, dependency){
exports = module.exports;
+exports.init = function() {
+ dispatch(this.pathname());
+};
+
exports.mode = function (m){
routes = [];
if((mode = m) != null)
flo = flow(routes, mode);
-}
+};
exports.use = function(mid){
middleware = new mid;
@@ -70,4 +74,4 @@ exports.reset = function(){
mode = null
routes = []
middleware = null
-}
\ No newline at end of file
+};
\ No newline at end of file
|
adding `init` method to keep state clean
|
diff --git a/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java b/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java
index <HASH>..<HASH> 100755
--- a/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java
+++ b/src/main/java/com/mebigfatguy/fbcontrib/detect/ClassEnvy.java
@@ -181,7 +181,7 @@ public class ClassEnvy extends BytecodeScanningDetector {
for (int i = 1; i < envies.length; i++) {
runnerUpEnvyCount += envies[i].getValue().cardinality();
}
- if (runnerUpEnvyCount >= bestEnvyCount) {
+ if ((2 * runnerUpEnvyCount) > bestEnvyCount) {
return;
}
}
|
make an envy class have to dominate other enviors
|
diff --git a/release/golden_notebook_tests/workloads/torch_tune_serve_test.py b/release/golden_notebook_tests/workloads/torch_tune_serve_test.py
index <HASH>..<HASH> 100644
--- a/release/golden_notebook_tests/workloads/torch_tune_serve_test.py
+++ b/release/golden_notebook_tests/workloads/torch_tune_serve_test.py
@@ -126,9 +126,7 @@ def get_remote_model(remote_model_checkpoint_path):
def get_model(model_checkpoint_path):
- checkpoint_dict = Trainer.load_checkpoint_from_path(
- model_checkpoint_path + "/checkpoint"
- )
+ checkpoint_dict = Trainer.load_checkpoint_from_path(model_checkpoint_path)
model_state = checkpoint_dict["model_state_dict"]
model = ResNet18(None)
|
[train/serve] Fix torch tune serve test (#<I>)
#<I> broke the smoke test as it was not run on CI - this PR hotfixes this
|
diff --git a/rest-provider/src/main/java/org/jboss/pressgang/ccms/wrapper/RESTTranslatedCSNodeV1Wrapper.java b/rest-provider/src/main/java/org/jboss/pressgang/ccms/wrapper/RESTTranslatedCSNodeV1Wrapper.java
index <HASH>..<HASH> 100644
--- a/rest-provider/src/main/java/org/jboss/pressgang/ccms/wrapper/RESTTranslatedCSNodeV1Wrapper.java
+++ b/rest-provider/src/main/java/org/jboss/pressgang/ccms/wrapper/RESTTranslatedCSNodeV1Wrapper.java
@@ -53,7 +53,7 @@ public class RESTTranslatedCSNodeV1Wrapper extends RESTBaseWrapper<TranslatedCSN
@Override
public void setNodeRevision(Integer revision) {
- getEntity().setNodeRevision(revision);
+ getEntity().explicitSetNodeRevision(revision);
}
@Override
|
Fixed a bug where the Translated CSNode Revision attribute wasn't being set to be saved.
|
diff --git a/web/opensubmit/admin/submission.py b/web/opensubmit/admin/submission.py
index <HASH>..<HASH> 100644
--- a/web/opensubmit/admin/submission.py
+++ b/web/opensubmit/admin/submission.py
@@ -233,11 +233,8 @@ class SubmissionAdmin(ModelAdmin):
'''
if db_field.name == "grading":
submurl = kwargs['request'].path
- try:
- submid = int(submurl.split('/')[-2])
- kwargs["queryset"] = Submission.objects.get(pk=submid).assignment.gradingScheme.gradings
- except:
- pass
+ submid = [int(s) for s in submurl.split('/') if s.isdigit()][0] # Will break with two numbers in the relative URL. This is ok.
+ kwargs["queryset"] = Submission.objects.get(pk=submid).assignment.gradingScheme.gradings
return super(SubmissionAdmin, self).formfield_for_dbfield(db_field, **kwargs)
def save_model(self, request, obj, form, change):
|
Show only assignment grading options, fixes regression of #<I>
|
diff --git a/emit/router.py b/emit/router.py
index <HASH>..<HASH> 100644
--- a/emit/router.py
+++ b/emit/router.py
@@ -278,9 +278,12 @@ class Router(object):
pass
for origin in resolved:
- self.routes.setdefault(origin, set())
- self.routes[origin].add(destination)
- self.logger.info('added route "%s" -> "%s"', origin, destination)
+ destinations = self.routes.setdefault(origin, set())
+
+ if destination not in destinations:
+ self.logger.info('added route "%s" -> "%s"', origin, destination)
+
+ destinations.add(destination)
def route(self, origin, message):
'''\
|
fix too much logging in regenerate_routes
|
diff --git a/downhill/base.py b/downhill/base.py
index <HASH>..<HASH> 100644
--- a/downhill/base.py
+++ b/downhill/base.py
@@ -132,7 +132,8 @@ class Optimizer(util.Registrar(str('Base'), (), {})):
yield vel_tm1, vel_t
if self.nesterov:
# https://github.com/lisa-lab/pylearn2/pull/136#issuecomment-10381617
- yield param, param + self.momentum * vel_t + delta
+ yield param, (param + self.momentum ** 2 * vel_tm1
+ + (1 + self.momentum) * delta)
else:
yield param, param + vel_t
|
Reformulate nesterov update after rereading paper.
|
diff --git a/account/src/test/java/com/ning/billing/account/AccountTestSuite.java b/account/src/test/java/com/ning/billing/account/AccountTestSuite.java
index <HASH>..<HASH> 100644
--- a/account/src/test/java/com/ning/billing/account/AccountTestSuite.java
+++ b/account/src/test/java/com/ning/billing/account/AccountTestSuite.java
@@ -18,5 +18,5 @@ package com.ning.billing.account;
import com.ning.billing.KillbillTestSuite;
-public class AccountTestSuite extends KillbillTestSuite {
+public abstract class AccountTestSuite extends KillbillTestSuite {
}
|
account: make AccountTestSuite abstract
|
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb
index <HASH>..<HASH> 100644
--- a/activerecord/test/cases/relation_test.rb
+++ b/activerecord/test/cases/relation_test.rb
@@ -26,7 +26,7 @@ module ActiveRecord
def test_initialize_single_values
relation = Relation.new(FakeKlass)
(Relation::SINGLE_VALUE_METHODS - [:create_with]).each do |method|
- assert_nil relation.send("#{method}_value"), method.to_s
+ assert_nil relation.public_send("#{method}_value"), method.to_s
end
value = relation.create_with_value
assert_equal({}, value)
@@ -36,7 +36,7 @@ module ActiveRecord
def test_multi_value_initialize
relation = Relation.new(FakeKlass)
Relation::MULTI_VALUE_METHODS.each do |method|
- values = relation.send("#{method}_values")
+ values = relation.public_send("#{method}_values")
assert_equal [], values, method.to_s
assert_predicate values, :frozen?, method.to_s
end
|
value_methods on Relation are public methods
|
diff --git a/src/javascript/runtime/RuntimeClient.js b/src/javascript/runtime/RuntimeClient.js
index <HASH>..<HASH> 100644
--- a/src/javascript/runtime/RuntimeClient.js
+++ b/src/javascript/runtime/RuntimeClient.js
@@ -48,6 +48,7 @@ define('moxie/runtime/RuntimeClient', [
constructor = Runtime.getConstructor(type);
if (!constructor || !constructor.can(options.required_caps)) {
initialize(items);
+ return;
}
// try initializing the runtime
|
RuntimeClient: Add missing return after fallback.
|
diff --git a/tests/Unit/Suites/Product/Block/FilterNavigationBlockTest.php b/tests/Unit/Suites/Product/Block/FilterNavigationBlockTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/Suites/Product/Block/FilterNavigationBlockTest.php
+++ b/tests/Unit/Suites/Product/Block/FilterNavigationBlockTest.php
@@ -46,10 +46,11 @@ class FilterNavigationBlockTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
$this->stubBlockRenderer = $this->getMock(BlockRenderer::class, [], [], '', false);
+ $blockName = 'foo';
$this->stubFilterCollection = $this->getMock(FilterNavigationFilterCollection::class, [], [], '', false);
$stubDataObject = $this->stubFilterCollection;
- $this->block = new FilterNavigationBlock($this->stubBlockRenderer, 'foo.phtml', 'foo', $stubDataObject);
+ $this->block = new FilterNavigationBlock($this->stubBlockRenderer, 'foo.phtml', $blockName, $stubDataObject);
}
public function testBlockClassIsExtended()
|
Issue #<I>: Refactor FilterNavigationBlockTest
|
diff --git a/etcdctlv3/main.go b/etcdctlv3/main.go
index <HASH>..<HASH> 100644
--- a/etcdctlv3/main.go
+++ b/etcdctlv3/main.go
@@ -43,9 +43,9 @@ var (
func init() {
rootCmd.PersistentFlags().StringVar(&globalFlags.Endpoints, "endpoint", "127.0.0.1:2378", "gRPC endpoint")
- rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CertFile, "cert", "", "identify HTTPS client using this SSL certificate file")
- rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.KeyFile, "key", "", "identify HTTPS client using this SSL key file")
- rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CAFile, "cacert", "", "verify certificates of HTTPS-enabled servers using this CA bundle")
+ rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CertFile, "cert", "", "identify secure client using this TLS certificate file")
+ rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.KeyFile, "key", "", "identify secure client using this TLS key file")
+ rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CAFile, "cacert", "", "verify certificates of TLS-enabled secure servers using this CA bundle")
rootCmd.AddCommand(
command.NewRangeCommand(),
|
etcdctlv3: secure is not HTTPS
|
diff --git a/treeherder/etl/push_loader.py b/treeherder/etl/push_loader.py
index <HASH>..<HASH> 100644
--- a/treeherder/etl/push_loader.py
+++ b/treeherder/etl/push_loader.py
@@ -160,6 +160,15 @@ class GithubPushTransformer(GithubTransformer):
URL_BASE = "https://api.github.com/repos/{}/{}/compare/{}...{}"
+ def get_branch(self):
+ """
+ Tag pushes don't use the actual branch, just the string "tag"
+ """
+ if self.message_body["details"].get("event.head.tag"):
+ return "tag"
+
+ return super(GithubPushTransformer, self).get_branch()
+
def transform(self, repository):
push_url = self.URL_BASE.format(
self.message_body["organization"],
|
Bug <I> - Fix KeyError in tag push situation of GithubPushTransformer (#<I>)
* fix: KeyError when GithubPushTransformer.get_branch's called when tag push triggers
* chore: remove unused whitespace
|
diff --git a/lib/active_record/postgresql_extensions/types.rb b/lib/active_record/postgresql_extensions/types.rb
index <HASH>..<HASH> 100644
--- a/lib/active_record/postgresql_extensions/types.rb
+++ b/lib/active_record/postgresql_extensions/types.rb
@@ -6,7 +6,23 @@ module ActiveRecord
class PostgreSQLAdapter
# Returns an Array of available languages.
def types(name = nil)
- query(%{SELECT typname FROM pg_type;}, name).map { |row| row[0] }
+ query(PostgreSQLExtensions::Utils.strip_heredoc(<<-SQL), name).map(&:first)
+ SELECT t.typname as type
+ FROM pg_type t
+ LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace
+ WHERE (t.typrelid = 0 OR (
+ SELECT c.relkind = 'c'
+ FROM pg_catalog.pg_class c
+ WHERE c.oid = t.typrelid
+ )) AND
+ NOT EXISTS(
+ SELECT 1
+ FROM pg_catalog.pg_type el
+ WHERE el.oid = t.typelem
+ AND el.typarray = t.oid
+ ) AND
+ n.nspname NOT IN ('information_schema');
+ SQL
end
def type_exists?(name)
|
Only return base and user-created types and not TOAST types and the like.
|
diff --git a/cmd/torrent/main.go b/cmd/torrent/main.go
index <HASH>..<HASH> 100644
--- a/cmd/torrent/main.go
+++ b/cmd/torrent/main.go
@@ -183,6 +183,9 @@ func main() {
func mainErr() error {
tagflag.Parse(&flags)
defer envpprof.Stop()
+ if stdoutAndStderrAreSameFile() {
+ log.Default = log.Logger{log.StreamLogger{W: progress.Bypass(), Fmt: log.LineFormatter}}
+ }
clientConfig := torrent.NewDefaultClientConfig()
clientConfig.NoDHT = !flags.Dht
clientConfig.Debug = flags.Debug
@@ -234,9 +237,6 @@ func mainErr() error {
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
client.WriteStatus(w)
})
- if stdoutAndStderrAreSameFile() {
- log.SetDefault(log.Logger{log.StreamLogger{W: progress.Bypass(), Fmt: log.LineFormatter}})
- }
if flags.Progress {
progress.Start()
}
|
cmd/torrent: Move log setup earlier to avoid race
|
diff --git a/src/commands-api.js b/src/commands-api.js
index <HASH>..<HASH> 100644
--- a/src/commands-api.js
+++ b/src/commands-api.js
@@ -22,6 +22,7 @@ import { locatorBuilders } from "./record";
export const selenium = new Selenium(BrowserBot.createForWindow(window));
let contentSideexTabId = window.contentSideexTabId;
+let targetSelector;
function doCommands(request, sender, sendResponse) {
if (request.commands) {
@@ -78,7 +79,6 @@ function doCommands(request, sender, sendResponse) {
}
return true;
}
- let targetSelector;
if (request.selectMode) {
if (request.selecting) {
targetSelector = new TargetSelector(function (element, win) {
|
keep the reference to the locator builder
|
diff --git a/src/tablesort.js b/src/tablesort.js
index <HASH>..<HASH> 100644
--- a/src/tablesort.js
+++ b/src/tablesort.js
@@ -117,7 +117,10 @@
};
// Sort as number if a currency key exists or number
- if (item.match(/^-?[£\x24Û¢´]\d/) || item.match(/^-?(\d+[,\.]?)+(E[\-+][\d]+)?%?$/)) {
+ if (item.match(/^-?[£\x24Û¢´€] ?\d/) || // prefixed currency
+ item.match(/^-?\d+\s*[€]/) || // suffixed currencty
+ item.match(/^-?(\d+[,\.]?)+(E[\-+][\d]+)?%?$/) // number
+ ) {
sortFunction = sortNumber;
} else if (testDate(item)) {
sortFunction = sortDate;
|
Fix #<I>: Recognized € as currency
- Recognize both "€5" and "5€"
- Also recognize if space in between: "€ 5", "5 €", "$5"
|
diff --git a/devices/philips.js b/devices/philips.js
index <HASH>..<HASH> 100644
--- a/devices/philips.js
+++ b/devices/philips.js
@@ -1843,6 +1843,15 @@ module.exports = [
ota: ota.zigbeeOTA,
},
{
+ zigbeeModel: ['3418331P6'],
+ model: '3418331P6',
+ vendor: 'Philips',
+ description: 'Hue white ambiance Adore bathroom mirror light',
+ meta: {turnsOffAtBrightness1: true},
+ extend: hueExtend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
+ ota: ota.zigbeeOTA,
+ },
+ {
zigbeeModel: ['5309331P6'],
model: '5309331P6',
vendor: 'Philips',
|
Add <I>P6 (#<I>)
* Add support for <I>P6
* add colortemp for <I>P6
* Update philips.js
* Update philips.js
|
diff --git a/parse.go b/parse.go
index <HASH>..<HASH> 100644
--- a/parse.go
+++ b/parse.go
@@ -157,15 +157,13 @@ func (p *parser) next() {
}
return
case DQUOTE:
+ p.pos = Pos(p.npos + 1)
switch b {
case '`', '"', '$':
- p.pos = Pos(p.npos + 1)
p.advanceTok(p.dqToken(b))
case '\n':
- p.pos++
p.advanceLitDquote()
default:
- p.pos = Pos(p.npos + 1)
p.advanceLitDquote()
}
return
@@ -182,16 +180,11 @@ func (p *parser) next() {
}
return
case SQUOTE:
- switch b {
- case '\'':
- p.pos = Pos(p.npos + 1)
+ p.pos = Pos(p.npos + 1)
+ if b == '\'' {
p.npos++
p.advanceTok(SQUOTE)
- case '\n':
- p.pos++
- p.advanceLitOther(q)
- default:
- p.pos = Pos(p.npos + 1)
+ } else {
p.advanceLitOther(q)
}
return
|
parse: clean up position logic in next()
|
diff --git a/lib/foodcritic/rake_task.rb b/lib/foodcritic/rake_task.rb
index <HASH>..<HASH> 100644
--- a/lib/foodcritic/rake_task.rb
+++ b/lib/foodcritic/rake_task.rb
@@ -24,8 +24,11 @@ module FoodCritic
desc "Lint Chef cookbooks"
task(name) do
result = FoodCritic::Linter.new.check(files, options)
- puts result
- fail if result.failed?
+ if result.warnings.any?
+ puts result
+ end
+
+ fail result.to_s if result.failed?
end
end
|
Reduce unnecessary blank lines from console output if there's nothing to print.
We only print the food critic reviews if there's a warning and fail with a proper message if there's any.
|
diff --git a/openquake/engine/performance.py b/openquake/engine/performance.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/performance.py
+++ b/openquake/engine/performance.py
@@ -204,7 +204,7 @@ class EnginePerformanceMonitor(PerformanceMonitor):
is intended for debugging purposes.
"""
if no_distribute():
- logs.LOG.warn('PyMem: %d mb, PgMem: %d mb' % self.mem_peaks)
+ logs.LOG.warn('PyMem: %s mb, PgMem: %s mb' % self.mem_peaks)
def __exit__(self, etype, exc, tb):
super(EnginePerformanceMonitor, self).__exit__(etype, exc, tb)
|
Fixed an error happening when the memory stats are not available (None instead of an integer)
Former-commit-id: <I>cbd<I>c<I>f4c7ba4dd<I>d8d2b0fdd
|
diff --git a/scot/var.py b/scot/var.py
index <HASH>..<HASH> 100644
--- a/scot/var.py
+++ b/scot/var.py
@@ -123,7 +123,7 @@ class VARBase():
R = np.array([[acm(m-k) for k in range(self.p)] for m in range(self.p)])
R = np.concatenate(np.concatenate(R, -2), -1)
- c = np.linalg.solve(R, r)
+ c = sp.linalg.solve(R, r, sym_pos=True)
c = np.concatenate([c[m::self.p, :] for m in range(n_channels)]).T
self.coef = c
|
switched to scipy solver
|
diff --git a/source/main/org/freecompany/redline/payload/Contents.java b/source/main/org/freecompany/redline/payload/Contents.java
index <HASH>..<HASH> 100644
--- a/source/main/org/freecompany/redline/payload/Contents.java
+++ b/source/main/org/freecompany/redline/payload/Contents.java
@@ -46,6 +46,7 @@ public class Contents {
builtin.add( "/bin");
builtin.add( "/dev");
builtin.add( "/etc");
+ builtin.add( "/etc/bash_completion.d");
builtin.add( "/etc/cron.d");
builtin.add( "/etc/cron.daily");
builtin.add( "/etc/cron.hourly");
@@ -64,6 +65,7 @@ public class Contents {
builtin.add( "/usr/sbin");
builtin.add( "/usr/share");
builtin.add( "/usr/share/applications");
+ builtin.add( "/root");
builtin.add( "/sbin");
builtin.add( "/opt");
builtin.add( "/tmp");
|
Add builtin entries for /root and /etc/bash_completion.d
|
diff --git a/billy/tests/fixtures/ex/districts.py b/billy/tests/fixtures/ex/districts.py
index <HASH>..<HASH> 100644
--- a/billy/tests/fixtures/ex/districts.py
+++ b/billy/tests/fixtures/ex/districts.py
@@ -1,7 +1,7 @@
districts = [{u'_id': u'ex-lower-1',
u'abbr': u'ex',
- u'boundary_id': u'fake_boudary_id-1',
+ u'boundary_id': u'sldu/ma-first-suffolk-middlesex',
u'chamber': u'lower',
u'name': u'1',
u'num_seats': 1}
|
changed boudary_id to Boston's district
|
diff --git a/lib/getDevices.js b/lib/getDevices.js
index <HASH>..<HASH> 100644
--- a/lib/getDevices.js
+++ b/lib/getDevices.js
@@ -26,7 +26,7 @@ module.exports = function(fromDevice, query, owner, callback) {
devicedata.forEach(function(device){
if(securityImpl.canDiscover(fromDevice, device)){
deviceResults.push(device);
-
+
delete device.token;
delete device.socketid;
delete device._id;
@@ -66,10 +66,6 @@ module.exports = function(fromDevice, query, owner, callback) {
if (query.online){
fetch.online = query.online === "true";
}
- if (_.isString(query.type) && query.type.toLowerCase() == "user"){
- fetch = {};
- fetch.uuid = fromDevice.uuid;
- }
delete fetch.token;
//sorts newest devices on top
|
Removed type=user condition in getDevices
|
diff --git a/parthial/built_ins.py b/parthial/built_ins.py
index <HASH>..<HASH> 100644
--- a/parthial/built_ins.py
+++ b/parthial/built_ins.py
@@ -91,3 +91,9 @@ def lisp_cdr(self, ctx, l):
cdr = l.val[1:]
return ctx.env.new(LispList(cdr))
+@built_in(default_globals, 'list', count_args=False)
+def lisp_list(self, ctx, l):
+ if len(l) > 1024:
+ raise LispError('too many items in list')
+ return ctx.env.new(LispList(l))
+
|
Fixed an incredibly stupid typo bug.
|
diff --git a/caravel/forms.py b/caravel/forms.py
index <HASH>..<HASH> 100644
--- a/caravel/forms.py
+++ b/caravel/forms.py
@@ -113,7 +113,9 @@ class FormFactory(object):
viz = self.viz
datasource = viz.datasource
default_metric = datasource.metrics_combo[0][0]
- default_groupby = datasource.groupby_column_names[0]
+
+ gb_cols = datasource.groupby_column_names
+ default_groupby = gb_cols[0] if gb_cols else None
group_by_choices = [(s, s) for s in datasource.groupby_column_names]
# Pool of all the fields that can be used in Caravel
self.field_dict = {
|
closes #<I> (#<I>)
|
diff --git a/u2fdemo/main.go b/u2fdemo/main.go
index <HASH>..<HASH> 100644
--- a/u2fdemo/main.go
+++ b/u2fdemo/main.go
@@ -51,7 +51,13 @@ func registerResponse(w http.ResponseWriter, r *http.Request) {
return
}
- reg, err := u2f.Register(regResp, *challenge, nil)
+ config := &u2f.Config{
+ // Chrome 66+ doesn't return the device's attestation
+ // certificate by default.
+ SkipAttestationVerify: true,
+ }
+
+ reg, err := u2f.Register(regResp, *challenge, config)
if err != nil {
log.Printf("u2f.Register error: %v", err)
http.Error(w, "error verifying response", http.StatusInternalServerError)
|
u2fdemo: Disable attestation verify by default due to new Chrome default policy
|
diff --git a/mimesis/__init__.py b/mimesis/__init__.py
index <HASH>..<HASH> 100755
--- a/mimesis/__init__.py
+++ b/mimesis/__init__.py
@@ -32,6 +32,8 @@ from .providers import (
Transport,
)
+from mimesis.schema import Schema, Field
+
__all__ = [
"Address",
"BaseDataProvider",
@@ -56,6 +58,9 @@ __all__ = [
"Cryptographic",
# Has all:
"Generic",
+ # Schema:
+ "Field",
+ "Schema",
# Meta:
"__version__",
"__title__",
|
Add Schema and Field to __init__.py
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -26,6 +26,10 @@ module.exports = function(config) {
}
},
+ mochaReporter: {
+ showDiff: true
+ },
+
webpackMiddleware: {
noInfo: true
}
|
turn on diffing in karma-reporter
|
diff --git a/azure/src/test/java/com/microsoft/azure/management/TestCdn.java b/azure/src/test/java/com/microsoft/azure/management/TestCdn.java
index <HASH>..<HASH> 100644
--- a/azure/src/test/java/com/microsoft/azure/management/TestCdn.java
+++ b/azure/src/test/java/com/microsoft/azure/management/TestCdn.java
@@ -87,7 +87,7 @@ public class TestCdn extends TestTemplate<CdnProfile, CdnProfiles> {
.parent()
.apply();
- Assert.assertEquals(2, profile.endpoints().size());
+ Assert.assertEquals(3, profile.endpoints().size());
CdnEndpoint updatedEndpoint = profile.endpoints().get(firstEndpointName);
Assert.assertTrue(updatedEndpoint.isHttpsAllowed());
Assert.assertEquals(1111, updatedEndpoint.httpPort());
|
big fix in CDN unit test (it was broken)
|
diff --git a/ui/src/shared/components/Annotation.js b/ui/src/shared/components/Annotation.js
index <HASH>..<HASH> 100644
--- a/ui/src/shared/components/Annotation.js
+++ b/ui/src/shared/components/Annotation.js
@@ -29,7 +29,8 @@ const Annotation = ({annotation, dygraph}) =>
<div
className="dygraph-annotation"
style={calcStyle(annotation, dygraph)}
- data-time={annotation.time}
+ data-time-ms={annotation.time}
+ data-time-local={new Date(+annotation.time)}
/>
const {shape, string} = PropTypes
|
Improve debuggability of annotations
This is ultimately going to be removed
|
diff --git a/source/Core/UtilsObject.php b/source/Core/UtilsObject.php
index <HASH>..<HASH> 100644
--- a/source/Core/UtilsObject.php
+++ b/source/Core/UtilsObject.php
@@ -154,7 +154,9 @@ class UtilsObject
*/
public static function setClassInstance($className, $instance)
{
- $className = strtolower($className);
+ if (!self::isNamespacedClass($className)) {
+ $className = strtolower($className);
+ }
self::$_aClassInstances[$className] = $instance;
}
@@ -234,7 +236,7 @@ class UtilsObject
array_shift($arguments);
$argumentsCount = count($arguments);
$shouldUseCache = $this->shouldCacheObject($className, $arguments);
- if (strpos($className, '\\') === false) {
+ if (!self::isNamespacedClass($className)) {
$className = strtolower($className);
}
@@ -431,4 +433,14 @@ class UtilsObject
{
return count($arguments) < 2 && (!isset($arguments[0]) || is_scalar($arguments[0]));
}
+
+ /**
+ * @param $className
+ *
+ * @return bool
+ */
+ private static function isNamespacedClass($className)
+ {
+ return strpos($className, '\\') !== false;
+ }
}
|
Ensure that class cache works correctly in oxNew
Class cache setter should act same as getter.
Before setter would always lower case class name, and getter only for not namespaced classes.
Classes without namespace should be in lowercase beacause they path's are different and class name is just a key to get path.
Class with namespace must be in camel case as namespace is class path.
|
diff --git a/drools-persistence-jpa/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java b/drools-persistence-jpa/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java
index <HASH>..<HASH> 100644
--- a/drools-persistence-jpa/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java
+++ b/drools-persistence-jpa/src/main/java/org/drools/persistence/jta/JtaTransactionManager.java
@@ -121,7 +121,7 @@ public class JtaTransactionManager
logger.debug( "No UserTransaction found at JNDI location [{}]",
DEFAULT_USER_TRANSACTION_NAME,
ex );
- return null;
+ throw new IllegalStateException("Unable to find transaction: " + ex.getMessage(), ex);
}
}
|
- throw exception if no user transaction was found
|
diff --git a/lib/rack-timeout.rb b/lib/rack-timeout.rb
index <HASH>..<HASH> 100644
--- a/lib/rack-timeout.rb
+++ b/lib/rack-timeout.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-require_relative 'rack/timeout'
+require 'rack/timeout'
if defined?(Rails) && [3,4].include?(Rails::VERSION::MAJOR)
class Rack::Timeout::Railtie < Rails::Railtie
|
no need for require_relative here
|
diff --git a/pwnypack/flow.py b/pwnypack/flow.py
index <HASH>..<HASH> 100644
--- a/pwnypack/flow.py
+++ b/pwnypack/flow.py
@@ -15,6 +15,7 @@ class ProcessChannel(object):
def __init__(self, *arguments):
self._process = subprocess.Popen(
arguments,
+ bufsize=0,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
)
@@ -96,7 +97,7 @@ class Flow(object):
def read(self, n, echo=None):
d = self.channel.read(n)
if echo or (echo is None and self.echo):
- sys.stdout.write(d.decode('utf-8'))
+ sys.stdout.write(d.decode('latin1'))
return d
def read_eof(self, echo=None):
@@ -129,7 +130,7 @@ class Flow(object):
def write(self, data, echo=None):
if echo or (echo is None and self.echo):
- sys.stdout.write(data)
+ sys.stdout.write(data.decode('latin1'))
self.channel.write(data)
def writelines(self, lines, echo=None):
|
Python3 fixes for flow.
- Use latin1 for echo mode as not everything will be encodable as utf-8.
- Disable buffering on subprocess.
|
diff --git a/src/config/createLatestConfig.js b/src/config/createLatestConfig.js
index <HASH>..<HASH> 100644
--- a/src/config/createLatestConfig.js
+++ b/src/config/createLatestConfig.js
@@ -66,9 +66,9 @@ export function createHelper({ modern = false, minified = false, runtime = true,
// changed from default. More efficient to use real polyfills.
polyfill: false
}])
- } else {
+ } /* else {
additionalPlugins.push("external-helpers")
- }
+ } */
return babel({
// Don't try to find .babelrc because we want to force this configuration.
|
Another round trying without external-helpers
|
diff --git a/src/main/java/com/semanticcms/openfile/servlet/OpenFile.java b/src/main/java/com/semanticcms/openfile/servlet/OpenFile.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/semanticcms/openfile/servlet/OpenFile.java
+++ b/src/main/java/com/semanticcms/openfile/servlet/OpenFile.java
@@ -96,7 +96,8 @@ final public class OpenFile {
String[] getCommand(java.io.File resourceFile) throws IOException;
}
- private static final Object fileOpenersLock = new Object();
+ private static class FileOpenersLock {}
+ private static final FileOpenersLock fileOpenersLock = new FileOpenersLock();
/**
* Registers a file opener.
|
Each lock object now a small empty class to help identify lock contention.
The lock contention profiler in NetBeans is just showing "java.lang.Object" all over, and can't seem to
get from the lock object id to the actual object in the heap dump using OQL (id not found).
|
diff --git a/js/bitfinex.js b/js/bitfinex.js
index <HASH>..<HASH> 100644
--- a/js/bitfinex.js
+++ b/js/bitfinex.js
@@ -678,7 +678,9 @@ module.exports = class bitfinex extends Exchange {
}
}
if (market !== undefined)
- symbol = market['symbol'];
+ symbol = market['symbol'].toUpperCase ();
+ else
+ symbol = order['symbol'];
let orderType = order['type'];
let exchange = orderType.indexOf ('exchange ') >= 0;
if (exchange) {
|
[bitfinex1] made parse order apply a default symbol if one can't be mapped (required for delisted symbols such as BCHUSD)
|
diff --git a/panels/dashcontrol/module.js b/panels/dashcontrol/module.js
index <HASH>..<HASH> 100644
--- a/panels/dashcontrol/module.js
+++ b/panels/dashcontrol/module.js
@@ -5,7 +5,7 @@ angular.module('kibana.dashcontrol', [])
var _d = {
group : "default",
save : {
- gist: true,
+ gist: false,
elasticsearch: true,
local: true,
'default': true
@@ -209,12 +209,10 @@ angular.module('kibana.dashcontrol', [])
}
$scope.gist_dblist = function(id) {
- $http({
- url: "https://api.github.com/gists/"+id,
- method: "GET"
- }).success(function(data, status, headers, config) {
+ $http.jsonp("https://api.github.com/gists/"+id+"?callback=JSON_CALLBACK"
+ ).success(function(response) {
$scope.gist.files = []
- _.each(data.files,function(v,k) {
+ _.each(response.data.files,function(v,k) {
try {
var file = JSON.parse(v.content)
$scope.gist.files.push(file)
|
Fixed gist loading, saving will require registration of your domain
|
diff --git a/txtemplate/templates.py b/txtemplate/templates.py
index <HASH>..<HASH> 100644
--- a/txtemplate/templates.py
+++ b/txtemplate/templates.py
@@ -138,6 +138,7 @@ class GenshiTemplateAdapter(object):
self._stream = None
self.template = template
self.delayedCall = None
+ self.serialize_method = 'html'
def _populateBuffer(self, stream, n):
"""
@@ -179,7 +180,7 @@ class GenshiTemplateAdapter(object):
self._stream = self.template.generate(**kwargs)
self._deferred = defer.Deferred()
self._deferred.addCallbacks(self._rendered, self._failed)
- s = self._stream.serialize()
+ s = self._stream.serialize(method=self.serialize_method)
self.delayedCall = reactor.callLater(CALL_DELAY, self._populateBuffer, s, POPULATE_N_STEPS)
return self._deferred
|
Option for serialize method in Genshi templates (now defaults to 'html', was implicitly 'xml').
|
diff --git a/src/main/java/org/gitlab/api/GitlabAPI.java b/src/main/java/org/gitlab/api/GitlabAPI.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/gitlab/api/GitlabAPI.java
+++ b/src/main/java/org/gitlab/api/GitlabAPI.java
@@ -154,7 +154,11 @@ public class GitlabAPI {
}
public List<GitlabCommit> getCommits(GitlabMergeRequest mergeRequest) throws IOException {
- String tailUrl = GitlabProject.URL + "/" + mergeRequest.getProjectId() +
+ Integer projectId = mergeRequest.getSourceProjectId();
+ if (projectId == null) {
+ projectId = mergeRequest.getProjectId();
+ }
+ String tailUrl = GitlabProject.URL + "/" + projectId +
"/repository" + GitlabCommit.URL + "?ref_name=" + mergeRequest.getSourceBranch();
GitlabCommit[] commits = retrieve().to(tailUrl, GitlabCommit[].class);
|
support merge requests from a different project (fork) in getCommits()
|
diff --git a/lib/Storeit.js b/lib/Storeit.js
index <HASH>..<HASH> 100644
--- a/lib/Storeit.js
+++ b/lib/Storeit.js
@@ -4,6 +4,7 @@ var Q = require("q");
var _ = require("underscore");
var pubit = require("pubit-as-promised");
var whatsDifferent = require("./utils").whatsDifferent;
+var previously = require("./utils").previously;
var isObject = require("./utils").isObject;
var cloneObject = require("./utils").cloneObject;
var isEqual = require("./utils").isEqual;
@@ -123,17 +124,22 @@ function Storeit(namespace, storageProvider) {
function setCache(key, value) {
var results = {};
if (has(key)) {
- var partial = value;
+ var previousPartial;
+ var partial;
var currentValue = getValue(key);
if (isObject(value) && isObject(currentValue)) {
value = _.extend(cloneObject(currentValue), value); // Allow "patching" with partial value.
partial = whatsDifferent(currentValue, value);
+ previousPartial = previously(currentValue, partial);
+ } else {
+ partial = value;
+ previousPartial = currentValue;
}
if (isEqual(currentValue, value)) {
results.action = Action.none;
} else {
cache[key].value = value;
- publish(EventName.modified, partial, key);
+ publish(EventName.modified, partial, key, previousPartial);
results.action = Action.modified;
}
} else {
|
Publish a `previousPartial` as a third parameter to `modified` event.
|
diff --git a/packages/node_modules/@webex/internal-plugin-wdm/src/config.js b/packages/node_modules/@webex/internal-plugin-wdm/src/config.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/internal-plugin-wdm/src/config.js
+++ b/packages/node_modules/@webex/internal-plugin-wdm/src/config.js
@@ -13,7 +13,8 @@ export default {
hydra: process.env.HYDRA_SERVICE_URL || 'https://api.ciscospark.com/v1'
},
defaults: {
- name: process.title.trim() || inBrowser && 'browser' || 'javascript',
+ name: (typeof process.title === 'string' ? process.title.trim() : undefined) ||
+ inBrowser && 'browser' || 'javascript',
deviceType: 'WEB',
model: 'web-js-sdk',
localizedModel: 'webex-js-sdk',
|
fix(internal-plugin-wdm): hotfix possible error trigger
Update config.device.defaults.name to also validate that
process.title is a string before attempting to run the
String.trim() command.
|
diff --git a/spec/ospec/runner.rb b/spec/ospec/runner.rb
index <HASH>..<HASH> 100644
--- a/spec/ospec/runner.rb
+++ b/spec/ospec/runner.rb
@@ -176,6 +176,7 @@ module Kernel
# FIXME: remove
def ruby_version_is(*); end
def pending(*); end
+ def language_version(*); end
end
module MSpec
diff --git a/spec/rubyspec/language/array_spec.rb b/spec/rubyspec/language/array_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rubyspec/language/array_spec.rb
+++ b/spec/rubyspec/language/array_spec.rb
@@ -114,4 +114,4 @@ describe "The packing splat operator (*)" do
end
-# language_version __FILE__, "array"
+language_version __FILE__, "array"
diff --git a/spec/rubyspec/language/block_spec.rb b/spec/rubyspec/language/block_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rubyspec/language/block_spec.rb
+++ b/spec/rubyspec/language/block_spec.rb
@@ -536,4 +536,4 @@ describe "A block" do
end
-# language_version __FILE__, "block"
+language_version __FILE__, "block"
|
Update some language specs from rubyspec
|
diff --git a/test/cases/coerced_tests.rb b/test/cases/coerced_tests.rb
index <HASH>..<HASH> 100644
--- a/test/cases/coerced_tests.rb
+++ b/test/cases/coerced_tests.rb
@@ -23,6 +23,28 @@ class UniquenessValidationTest < ActiveRecord::TestCase
end
end
end
+
+ # Same as original coerced test except that it handles default SQL Server case-insensitive collation.
+ coerce_tests! :test_validate_uniqueness_by_default_database_collation
+ def test_validate_uniqueness_by_default_database_collation_coerced
+ Topic.validates_uniqueness_of(:author_email_address)
+
+ topic1 = Topic.new(author_email_address: "david@loudthinking.com")
+ topic2 = Topic.new(author_email_address: "David@loudthinking.com")
+
+ assert_equal 1, Topic.where(author_email_address: "david@loudthinking.com").count
+
+ assert_not topic1.valid?
+ assert_not topic1.save
+
+ # Case insensitive collation (SQL_Latin1_General_CP1_CI_AS) by default.
+ # Should not allow "David" if "david" exists.
+ assert_not topic2.valid?
+ assert_not topic2.save
+
+ assert_equal 1, Topic.where(author_email_address: "david@loudthinking.com").count
+ assert_equal 1, Topic.where(author_email_address: "David@loudthinking.com").count
+ end
end
require "models/event"
|
Coerce test to handle default case-insensitive collation (#<I>)
|
diff --git a/clustering/server/src/main/java/org/wildfly/clustering/server/singleton/ServiceLifecycle.java b/clustering/server/src/main/java/org/wildfly/clustering/server/singleton/ServiceLifecycle.java
index <HASH>..<HASH> 100644
--- a/clustering/server/src/main/java/org/wildfly/clustering/server/singleton/ServiceLifecycle.java
+++ b/clustering/server/src/main/java/org/wildfly/clustering/server/singleton/ServiceLifecycle.java
@@ -80,16 +80,8 @@ public class ServiceLifecycle implements Lifecycle {
monitor.awaitStability();
- State state = this.controller.getState();
- switch (state) {
- case START_FAILED: {
- throw new IllegalStateException(this.controller.getStartException());
- }
- default: {
- if (state != targetState) {
- throw new IllegalStateException(state.toString());
- }
- }
+ if (this.controller.getState() == ServiceController.State.START_FAILED) {
+ throw new IllegalStateException(this.controller.getStartException());
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
|
Ignore service state transition failures due to removed services.
|
diff --git a/lib/ldapter/entry.rb b/lib/ldapter/entry.rb
index <HASH>..<HASH> 100644
--- a/lib/ldapter/entry.rb
+++ b/lib/ldapter/entry.rb
@@ -502,7 +502,8 @@ module Ldapter
private :check_server_contraints
# For new objects, does an LDAP add. For existing objects, does an LDAP
- # modify. This only sends the modified attributes to the server.
+ # modify. This only sends the modified attributes to the server. If a
+ # server constraint was violated, populates #errors and returns false.
def save
return false unless valid?
if @original_attributes
@@ -518,6 +519,7 @@ module Ldapter
true
end
+ # Like #save, but raise an exception if the entry could not be saved.
def save!
save ? self : raise(EntryNotSaved)
end
|
Document #save and #save!
|
diff --git a/tests/test_main.py b/tests/test_main.py
index <HASH>..<HASH> 100644
--- a/tests/test_main.py
+++ b/tests/test_main.py
@@ -1,3 +1,4 @@
+import sys
import asyncio
import os
import time
@@ -36,6 +37,11 @@ def test_sigterm():
assert not loop.is_closed()
+@pytest.mark.skipif(sys.version_info >= (3, 7), reason=(
+ "On nightly (3.7), the use of uvloop causes the following error:\n\n"
+ "AttributeError: module 'asyncio.coroutines' has no attribute 'debug_wrapper'\n\n"
+ "This is being tracked upstream at https://github.com/MagicStack/uvloop/issues/126"
+))
def test_uvloop():
"""Basic SIGTERM"""
async def main():
|
Skip uvloop test on nightly.
|
diff --git a/src/pyctd/manager/database.py b/src/pyctd/manager/database.py
index <HASH>..<HASH> 100755
--- a/src/pyctd/manager/database.py
+++ b/src/pyctd/manager/database.py
@@ -29,8 +29,8 @@ from ..constants import bcolors
log = logging.getLogger(__name__)
alchemy_pandas_dytpe_mapper = {
- sqltypes.Text: np.unicode,
- sqltypes.String: np.unicode,
+ sqltypes.Text: np.object,
+ sqltypes.String: np.object,
sqltypes.Integer: np.float,
sqltypes.REAL: np.double
}
|
changed np.unicode to np.pbject in alchemy_pandas_dytpe_mapper
|
diff --git a/lib/draper/decorated_enumerable_proxy.rb b/lib/draper/decorated_enumerable_proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/draper/decorated_enumerable_proxy.rb
+++ b/lib/draper/decorated_enumerable_proxy.rb
@@ -27,7 +27,7 @@ module Draper
alias :is_a? :kind_of?
def ==(other)
- @wrapped_collection == other
+ @wrapped_collection == (other.respond_to?(:source) ? other.source : other)
end
def to_s
|
Fixing problem when comparing two decorated collections with eq matcher on rspec expect method
|
diff --git a/src/org/openscience/cdk/qsar/model/R2/RModel.java b/src/org/openscience/cdk/qsar/model/R2/RModel.java
index <HASH>..<HASH> 100644
--- a/src/org/openscience/cdk/qsar/model/R2/RModel.java
+++ b/src/org/openscience/cdk/qsar/model/R2/RModel.java
@@ -32,8 +32,6 @@ public abstract class RModel implements IModel {
private String modelName = null;
protected RList modelObject = null;
protected HashMap params = null;
- protected String paramVarName = null;
-
/**
* The object that performs the calls to the R engine.
@@ -263,7 +261,7 @@ public abstract class RModel implements IModel {
if (prefix == null || prefix.equals("")) prefix = "var";
Random rnd = new Random();
long uid = ((System.currentTimeMillis() >>> 16) << 16) + rnd.nextLong();
- return prefix + uid;
+ return prefix + String.valueOf(Math.abs(uid)).trim();
}
/**
|
made the unique var name method more robust and also modified to convert -ve values of the nuemric part to +ve
git-svn-id: <URL>
|
diff --git a/src/Vinelab/Cdn/Providers/AwsS3Provider.php b/src/Vinelab/Cdn/Providers/AwsS3Provider.php
index <HASH>..<HASH> 100755
--- a/src/Vinelab/Cdn/Providers/AwsS3Provider.php
+++ b/src/Vinelab/Cdn/Providers/AwsS3Provider.php
@@ -137,6 +137,7 @@ class AwsS3Provider extends Provider implements ProviderInterface
'acl' => $this->default['providers']['aws']['s3']['acl'],
'cloudfront' => $this->default['providers']['aws']['s3']['cloudfront']['use'],
'cloudfront_url' => $this->default['providers']['aws']['s3']['cloudfront']['cdn_url'],
+ 'http' => $this->default['providers']['aws']['s3']['http'],
];
// check if any required configuration is missed
|
fix an issue for non-pem users
|
diff --git a/PHPCompatibility/Tests/BaseSniffTest.php b/PHPCompatibility/Tests/BaseSniffTest.php
index <HASH>..<HASH> 100644
--- a/PHPCompatibility/Tests/BaseSniffTest.php
+++ b/PHPCompatibility/Tests/BaseSniffTest.php
@@ -272,7 +272,7 @@ class BaseSniffTest extends TestCase
private function assertForType($issues, $type, $lineNumber, $expectedMessage)
{
if (isset($issues[$lineNumber]) === false) {
- throw new \Exception("Expected $type '$expectedMessage' on line number $lineNumber, but none found.");
+ $this->fail("Expected $type '$expectedMessage' on line number $lineNumber, but none found.");
}
$insteadFoundMessages = array();
|
BaseSniffTest: fail test on missing message, don't error
When an (unexpected) exception is thrown by a test, the test will be marked as "Errored", not as "Failed".
With that in mind, when an error/warning is expected on a certain line and it isn't found, the test should fail, not error.
Fixed now.
|
diff --git a/QuickBooks/IPP/Service/TaxAgency.php b/QuickBooks/IPP/Service/TaxAgency.php
index <HASH>..<HASH> 100644
--- a/QuickBooks/IPP/Service/TaxAgency.php
+++ b/QuickBooks/IPP/Service/TaxAgency.php
@@ -25,4 +25,9 @@ class QuickBooks_IPP_Service_TaxAgency extends QuickBooks_IPP_Service
{
return parent::_query($Context, $realm, $query);
}
+
+ public function add($Context, $realm, $Object)
+ {
+ return parent::_add($Context, $realm, QuickBooks_IPP_IDS::RESOURCE_TAXAGENCY, $Object);
+ }
}
|
Update TaxAgency.php
Add add() method
|
diff --git a/spool/spoolverb.py b/spool/spoolverb.py
index <HASH>..<HASH> 100644
--- a/spool/spoolverb.py
+++ b/spool/spoolverb.py
@@ -38,7 +38,7 @@ class Spoolverb(object):
self.meta = meta
self.version = version
self.num_editions = num_editions
- self.edition_number = edition_num
+ self.edition_number = edition_num if edition_num else ''
self.loan_start = loan_start
self.loan_end = loan_end
self.action = action
|
loan spoolverb now supports empty num_editions parameters.
Used when loaning a piece
|
diff --git a/mod/forum/lib.php b/mod/forum/lib.php
index <HASH>..<HASH> 100644
--- a/mod/forum/lib.php
+++ b/mod/forum/lib.php
@@ -138,7 +138,22 @@ function forum_update_instance($forum) {
notify('Warning! There is more than one discussion in this forum - using the most recent');
$discussion = array_pop($discussions);
} else {
- print_error('cannotfinddisscussion', 'forum');
+ // try to recover by creating initial discussion - MDL-16262
+ $discussion = new object();
+ $discussion->course = $forum->course;
+ $discussion->forum = $forum->id;
+ $discussion->name = $forum->name;
+ $discussion->intro = $forum->intro;
+ $discussion->assessed = $forum->assessed;
+ $discussion->format = $forum->type;
+ $discussion->mailnow = false;
+ $discussion->groupid = -1;
+
+ forum_add_discussion($discussion, null, $message);
+
+ if (! $discussion = $DB->get_record('forum_discussions', array('forum'=>$forum->id))) {
+ print_error('cannotadd', 'forum');
+ }
}
}
if (! $post = $DB->get_record('forum_posts', array('id'=>$discussion->firstpost))) {
|
MDL-<I> recovery of broken single simple discussions after old reset
|
diff --git a/packages/ember-metal/lib/core.js b/packages/ember-metal/lib/core.js
index <HASH>..<HASH> 100644
--- a/packages/ember-metal/lib/core.js
+++ b/packages/ember-metal/lib/core.js
@@ -167,7 +167,7 @@ if (typeof Ember.EXTEND_PROTOTYPES === 'undefined') {
Ember.LOG_STACKTRACE_ON_DEPRECATION = (Ember.ENV.LOG_STACKTRACE_ON_DEPRECATION !== false);
/**
- Determines whether Ember should add ECMAScript 5 shims to older browsers.
+ Determines whether Ember should add ECMAScript 5 Array shims to older browsers.
@property SHIM_ES5
@type Boolean
|
Clarify that SHIM_ES5 only adds Array methods
I spent a little time today trying to figure out why the SHIM_ES5 setting wasn't shimming Function#bind — and its because this flag only enables Array method shims. Added clarification.
|
diff --git a/spec/dummy/config/environments/test.rb b/spec/dummy/config/environments/test.rb
index <HASH>..<HASH> 100644
--- a/spec/dummy/config/environments/test.rb
+++ b/spec/dummy/config/environments/test.rb
@@ -30,7 +30,7 @@ Rails.application.configure do
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
- config.action_controller.allow_forgery_protection = false
+ config.action_controller.allow_forgery_protection = true
config.action_mailer.perform_caching = false
diff --git a/spec/features/admin/legacy_page_url_management_spec.rb b/spec/features/admin/legacy_page_url_management_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/features/admin/legacy_page_url_management_spec.rb
+++ b/spec/features/admin/legacy_page_url_management_spec.rb
@@ -11,7 +11,8 @@ RSpec.describe "Legacy page url management", type: :system, js: true do
def open_page_properties
visit admin_pages_path
- page.find("a[href='#{configure_admin_page_path(a_page)}']").click
+ expect(page).to have_no_css(".spinner")
+ page.find("a[href='#{configure_admin_page_path(a_page)}']", wait: 10).click
end
it "lets a user add a page link" do
|
fix admin sitemap feature specs
Enable forgery protection so we have a csrf-token in the dom that our ajax lib
expects.
Also wait for the sitemap spinner to disappear
before acting with the dom with capybara
|
diff --git a/test/helper.rb b/test/helper.rb
index <HASH>..<HASH> 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -16,6 +16,9 @@ puts "Testing with Rails #{Rails.version}"
require 'dalli'
require 'logger'
+require 'active_support/time'
+require 'active_support/cache/dalli_store'
+
Dalli.logger = Logger.new(STDOUT)
Dalli.logger.level = Logger::ERROR
|
Explicitly include the Dalli cache adapter and ActiveSupport::Time to avoid intermittent failures in CI
|
diff --git a/lib/rest-sugar-client.js b/lib/rest-sugar-client.js
index <HASH>..<HASH> 100644
--- a/lib/rest-sugar-client.js
+++ b/lib/rest-sugar-client.js
@@ -50,6 +50,10 @@ function op(method, r, q) {
request.get({url: r + '/' + id, qs: o},
handle(cb));
}
+ else if(funkit.isFunction(o)) {
+ request.get({url: r, qs: {method: method}},
+ handle(cb));
+ }
else {
o = o? o: '';
request.get({url: r + o, qs: {method: method}},
|
Make it possible to pass cb as the first param
Ie. api.count(cb) should work now.
|
diff --git a/alot/buffers.py b/alot/buffers.py
index <HASH>..<HASH> 100644
--- a/alot/buffers.py
+++ b/alot/buffers.py
@@ -6,6 +6,7 @@ import settings
import commands
from walker import PipeWalker
from helper import shorten_author_string
+from db import NonexistantObjectError
class Buffer(object):
@@ -228,7 +229,12 @@ class ThreadBuffer(Buffer):
self._build_pile(acc, reply, msg, depth + 1)
def rebuild(self):
- self.thread.refresh()
+ try:
+ self.thread.refresh()
+ except NonexistantObjectError:
+ self.body = urwid.SolidFill()
+ self.message_count = 0
+ return
# depth-first traversing the thread-tree, thereby
# 1) build a list of tuples (parentmsg, depth, message) in DF order
# 2) create a dict that counts no. of direct replies per message
@@ -255,7 +261,9 @@ class ThreadBuffer(Buffer):
depth=depth,
bars_at=bars)
msglines.append(mwidget)
+
self.body = urwid.ListBox(msglines)
+ self.message_count = self.thread.get_total_messages()
def get_selection(self):
"""returns focussed :class:`~alot.widgets.MessageWidget`"""
|
ThreadBuffer rebuilds to SolidFill if thread nonexistant
ThreadBuffer will display as urwid.SolidFill if the
displayed thread seized to exist. This could happen
for example if the last message of that thread has been
removed.
|
diff --git a/aws/resource_aws_lb_listener.go b/aws/resource_aws_lb_listener.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_lb_listener.go
+++ b/aws/resource_aws_lb_listener.go
@@ -92,6 +92,7 @@ func resourceAwsLbListener() *schema.Resource {
"order": {
Type: schema.TypeInt,
Optional: true,
+ Computed: true,
ValidateFunc: validation.IntBetween(1, 50000),
},
|
resource/aws_lb_listener: Set action order to Computed
While the acceptance testing is not finding this scenario, the order value may return as 1. This may be caused by web console updates.
|
diff --git a/components/remotes/remotes.js b/components/remotes/remotes.js
index <HASH>..<HASH> 100644
--- a/components/remotes/remotes.js
+++ b/components/remotes/remotes.js
@@ -92,7 +92,6 @@ class RemotesViewModel {
updateRemotes() {
return this.server.getPromise('/remotes', { path: this.repoPath() })
.then(remotes => {
- const outerThis = this;
remotes = remotes.map(remote => ({
name: remote,
changeRemote: () => { this.currentRemote(remote) }
|
Update components/remotes/remotes.js
|
diff --git a/openquake/job/__init__.py b/openquake/job/__init__.py
index <HASH>..<HASH> 100644
--- a/openquake/job/__init__.py
+++ b/openquake/job/__init__.py
@@ -80,7 +80,7 @@ def run_job(job_file, output_type):
a_job.set_status('running')
try:
- results = a_job.launch()
+ a_job.launch()
except sqlalchemy.exc.SQLAlchemyError:
# Try to cleanup the session status to have a chance to update the
# job record without further errors.
@@ -97,9 +97,6 @@ def run_job(job_file, output_type):
raise
else:
a_job.set_status('succeeded')
-
- for filepath in results:
- print filepath
else:
a_job.set_status('failed')
|
Only print file names when they are written to disk.
Former-commit-id: 5b<I>cb1e2f<I>da7ddac<I>a<I>c7b0b0a<I>
|
diff --git a/HardwareSource.py b/HardwareSource.py
index <HASH>..<HASH> 100644
--- a/HardwareSource.py
+++ b/HardwareSource.py
@@ -433,7 +433,7 @@ class HardwareSourceDataBuffer(object):
# select the preferred item.
# TODO: better mechanism for selecting preferred item at start of acquisition.
if self.first_data:
- self.notify_listeners("acquisition_started", self.data_group, new_channel_to_data_item_dict)
+ self.notify_listeners("acquisition_started", self.hardware_source, self.data_group, new_channel_to_data_item_dict)
self.first_data = False
# update the data items with the new data.
|
Rework source panel to not use combobox pop-up.
svn r<I>
|
diff --git a/moskito-core/src/main/java/net/anotheria/moskito/core/predefined/AbstractStatsFactory.java b/moskito-core/src/main/java/net/anotheria/moskito/core/predefined/AbstractStatsFactory.java
index <HASH>..<HASH> 100644
--- a/moskito-core/src/main/java/net/anotheria/moskito/core/predefined/AbstractStatsFactory.java
+++ b/moskito-core/src/main/java/net/anotheria/moskito/core/predefined/AbstractStatsFactory.java
@@ -3,7 +3,6 @@ package net.anotheria.moskito.core.predefined;
import java.util.Arrays;
import net.anotheria.moskito.core.dynamic.IOnDemandStatsFactory;
-import net.anotheria.moskito.core.predefined.Constants;
import net.anotheria.moskito.core.producers.IStats;
import net.anotheria.moskito.core.stats.Interval;
|
removed unneeded import (pmd)
|
diff --git a/opentrons_sdk/drivers/motor.py b/opentrons_sdk/drivers/motor.py
index <HASH>..<HASH> 100644
--- a/opentrons_sdk/drivers/motor.py
+++ b/opentrons_sdk/drivers/motor.py
@@ -7,6 +7,11 @@ import serial
from opentrons_sdk.util import log
+JSON_ERROR = None
+if sys.version_info > (3, 4):
+ JSON_ERROR = ValueError
+else:
+ JSON_ERROR = json.decoder.JSONDecodeError
class GCodeLogger():
@@ -344,7 +349,9 @@ class CNCDriver(object):
coords['target'][letter] = response_dict.get(letter.upper(),0)
- except (ValueError, json.decoder.JSONDecodeError) as e:
+ # TODO (andy): travis-ci is testing on both 3.4 and 3.5
+ # JSONDecodeError does not exist in 3.4 so the build breaks here
+ except JSON_ERROR as e:
log.debug("Serial", "Error parsing JSON string:")
log.debug("Serial", res)
|
json throws diff error depending on python version
|
diff --git a/odl/test/solvers/functional/default_functionals_test.py b/odl/test/solvers/functional/default_functionals_test.py
index <HASH>..<HASH> 100644
--- a/odl/test/solvers/functional/default_functionals_test.py
+++ b/odl/test/solvers/functional/default_functionals_test.py
@@ -583,7 +583,7 @@ def test_weighted_proximal_L1_norm(space):
# Check if the subdifferential inequalities are satisfied.
# p = prox_{sigma * f}(x) iff (x - p)/sigma = grad f(p)
- assert all_almost_equal(func.gradient(p1), space.divide(x - p1, sigma))
+ assert all_almost_equal(func.gradient(p1), (x - p1) / sigma)
if __name__ == '__main__':
|
MAINT: Replace 'divide' by '/' in test.
|
diff --git a/tests/Functional/CheckerManagerTest.php b/tests/Functional/CheckerManagerTest.php
index <HASH>..<HASH> 100644
--- a/tests/Functional/CheckerManagerTest.php
+++ b/tests/Functional/CheckerManagerTest.php
@@ -42,7 +42,7 @@ class CheckerManagerTest extends TestCase
/**
* @expectedException \InvalidArgumentException
- * @expectedExceptionMessage The JWT is issued in the futur.
+ * @expectedExceptionMessage The JWT is issued in the future.
*/
public function testJWTIssuedInTheFuture()
{
|
Test fixed
Test failed due to the modification introduced by #<I>
|
diff --git a/casviewer/blobs.go b/casviewer/blobs.go
index <HASH>..<HASH> 100644
--- a/casviewer/blobs.go
+++ b/casviewer/blobs.go
@@ -84,7 +84,7 @@ func returnBlob(ctx context.Context, w http.ResponseWriter, cl *client.Client, b
// readBlob reads the blob from CAS.
func readBlob(ctx context.Context, cl *client.Client, bd *digest.Digest) ([]byte, error) {
- b, err := cl.ReadBlob(ctx, *bd)
+ b, _, err := cl.ReadBlob(ctx, *bd)
if err != nil {
// convert gRPC code to LUCI errors tag.
t := grpcutil.Tag.With(status.Code(err))
|
casviewer: fix build
This is follow up for
<URL>
|
diff --git a/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb b/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb
+++ b/lib/fog/vcloud_director/generators/compute/edge_gateway_service_configuration.rb
@@ -143,6 +143,7 @@ module Fog
xml.SourcePort rule[:SourcePort] == "Any" ? "-1" : rule[:SourcePort]
xml.SourcePortRange rule[:SourcePortRange]
xml.SourceIp rule[:SourceIp]
+ xml.EnableLogging rule[:EnableLogging] if rule.key?(:EnableLogging)
}
end
|
Add EnableLogging field to FirewallService XML
|
diff --git a/lib/components/src/theme.js b/lib/components/src/theme.js
index <HASH>..<HASH> 100644
--- a/lib/components/src/theme.js
+++ b/lib/components/src/theme.js
@@ -25,6 +25,8 @@ export const normal = {
mainTextColor: baseFonts.color,
dimmedTextColor: 'rgba(0,0,0,0.4)',
highlightColor: '#9fdaff',
+ successColor: '#0edf62',
+ failColor: '#ff3f3f',
mainTextSize: 13,
monoTextFace: monoFonts.fontFamily,
layoutMargin: '10px',
@@ -51,6 +53,8 @@ export const dark = {
mainTextColor: '#efefef',
dimmedTextColor: 'rgba(255,255,255,0.4)',
highlightColor: '#9fdaff',
+ successColor: '#0edf62',
+ failColor: '#ff3f3f',
mainTextSize: 13,
monoTextFace: monoFonts.fontFamily,
layoutMargin: '10px',
|
ADD success & fail colours to theme
|
diff --git a/lib/events-ha-node.js b/lib/events-ha-node.js
index <HASH>..<HASH> 100644
--- a/lib/events-ha-node.js
+++ b/lib/events-ha-node.js
@@ -73,7 +73,9 @@ class EventsHaNode extends EventsNode {
switch (type) {
case INTEGRATION_UNLOADED:
case INTEGRATION_NOT_LOADED:
- this.isEnabled = true;
+ if (this.type !== 'trigger-state') {
+ this.isEnabled = true;
+ }
this.removeSubscription();
this.updateConnectionStatus();
break;
|
fix: stop enabling trigger-state node on connection to HA
Fixes: #<I>
|
diff --git a/securesystemslib/keys.py b/securesystemslib/keys.py
index <HASH>..<HASH> 100755
--- a/securesystemslib/keys.py
+++ b/securesystemslib/keys.py
@@ -602,8 +602,8 @@ def format_metadata_to_key(key_metadata):
keytype = key_metadata['keytype']
key_value = key_metadata['keyval']
- # Convert 'key_value' to 'securesystemslib.formats.KEY_SCHEMA' and generate its
- # hash The hash is in hexdigest form.
+ # Convert 'key_value' to 'securesystemslib.formats.KEY_SCHEMA' and generate
+ # its hash The hash is in hexdigest form.
default_keyid = _get_keyid(keytype, key_value)
keyids = set()
keyids.add(default_keyid)
@@ -637,7 +637,7 @@ def _get_keyid(keytype, key_value, hash_algorithm = 'sha256'):
# Create a digest object and call update(), using the JSON
# canonical format of 'rskey_meta' as the update data.
- digest_object = securesystemslib.hash.digest(_KEY_ID_HASH_ALGORITHM)
+ digest_object = securesystemslib.hash.digest(hash_algorithm)
digest_object.update(key_update_data.encode('utf-8'))
# 'keyid' becomes the hexadecimal representation of the hash.
|
Fix bug in _get_keyid()
The hash_algorithm argument to _get_keyid() wasn't correctly being used
|
diff --git a/go/vt/wrangler/wrangler.go b/go/vt/wrangler/wrangler.go
index <HASH>..<HASH> 100644
--- a/go/vt/wrangler/wrangler.go
+++ b/go/vt/wrangler/wrangler.go
@@ -94,7 +94,7 @@ func (wr *Wrangler) ChangeType(tabletAlias naming.TabletAlias, dbType naming.Tab
// You don't have a choice - you must wait for
// completion before rebuilding.
if err == nil {
- err = wr.ai.WaitForCompletion(actionPath, DefaultActionTimeout)
+ err = wr.ai.WaitForCompletion(actionPath, wr.actionTimeout())
}
}
|
ChangeType should use the wrangler's action timeout.
|
diff --git a/lib/mementus.rb b/lib/mementus.rb
index <HASH>..<HASH> 100644
--- a/lib/mementus.rb
+++ b/lib/mementus.rb
@@ -1,5 +1,5 @@
require 'virtus'
require 'axiom-memory-adapter'
-require 'mementus/version'
-require 'mementus/model'
+require_relative 'mementus/version'
+require_relative 'mementus/model'
diff --git a/lib/mementus/version.rb b/lib/mementus/version.rb
index <HASH>..<HASH> 100644
--- a/lib/mementus/version.rb
+++ b/lib/mementus/version.rb
@@ -1,3 +1,3 @@
module Mementus
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
diff --git a/spec/collection_spec.rb b/spec/collection_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/collection_spec.rb
+++ b/spec/collection_spec.rb
@@ -9,11 +9,13 @@ describe Mementus::Model do
attribute :order, Integer
end
- 20.times do |i|
- item = Item.new
- item.name = "Item: #{i.to_s}"
- item.order = i + 1
- item.create
+ before(:all) do
+ 20.times do |i|
+ item = Item.new
+ item.name = "Item: #{i.to_s}"
+ item.order = i + 1
+ item.create
+ end
end
it "counts created items" do
|
Use before hook in collection spec to deal with gc issues
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.