diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/tinman/handlers/__init__.py b/tinman/handlers/__init__.py
index <HASH>..<HASH> 100644
--- a/tinman/handlers/__init__.py
+++ b/tinman/handlers/__init__.py
@@ -2,4 +2,5 @@
application development.
"""
+from tinman.handlers.base import RequestHandler
from tinman.handlers.session import SessionRequestHandler
|
Make the base request handler available by default
|
diff --git a/harvester.py b/harvester.py
index <HASH>..<HASH> 100644
--- a/harvester.py
+++ b/harvester.py
@@ -208,7 +208,8 @@ class Statistics:
self._fps_max = 0.
def increment_num_images(self, num=1):
- self._num_images += num
+ if self._has_acquired_1st_timestamp:
+ self._num_images += num
@property
def fps(self):
|
Do not include the first image for taking statistics
|
diff --git a/phantomcss.js b/phantomcss.js
index <HASH>..<HASH> 100755
--- a/phantomcss.js
+++ b/phantomcss.js
@@ -182,7 +182,7 @@ function screenshot( target, timeToWait, hideSelector, fileName ) {
}
function isComponentsConfig( obj ) {
- return ( obj instanceof Object ) && ( isClipRect( obj ) === false );
+ return ( Object.prototype.toString.call(obj) == '[object Object]' ) && ( isClipRect( obj ) === false );
}
function grab(filepath, target){
|
Stronger checking of Object type to fix issue with SlimerJS
|
diff --git a/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java b/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java
index <HASH>..<HASH> 100644
--- a/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java
+++ b/languagetool-gui-commons/src/main/java/org/languagetool/gui/Configuration.java
@@ -185,13 +185,13 @@ public class Configuration {
return disabledCategoryNames;
}
- public void setDisabledRuleIds(Set<String> ruleIDs) {
- disabledRuleIds = ruleIDs;
- enabledRuleIds.removeAll(ruleIDs);
+ public void setDisabledRuleIds(Set<String> ruleIds) {
+ disabledRuleIds = ruleIds;
+ enabledRuleIds.removeAll(ruleIds);
}
- public void setEnabledRuleIds(Set<String> ruleIDs) {
- enabledRuleIds = ruleIDs;
+ public void setEnabledRuleIds(Set<String> ruleIds) {
+ enabledRuleIds = ruleIds;
}
public void setDisabledCategoryNames(Set<String> categoryNames) {
|
more consistent variable naming with rest of code
|
diff --git a/progressbar/bar.py b/progressbar/bar.py
index <HASH>..<HASH> 100644
--- a/progressbar/bar.py
+++ b/progressbar/bar.py
@@ -533,7 +533,7 @@ class ProgressBar(StdRedirectMixin, ResizableMixin, ProgressBarBase):
except StopIteration:
self.finish()
raise
- except GeneratorExit:
+ except GeneratorExit: # pragma: no cover
self.finish(dirty=True)
raise
|
ignoring "impossible" use case for test coverage
|
diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Component/Process/Process.php
+++ b/src/Symfony/Component/Process/Process.php
@@ -53,7 +53,7 @@ class Process
}
$this->commandline = $commandline;
- $this->cwd = null === $cwd ? getcwd() : $cwd;
+ $this->cwd = $cwd;
if (null !== $env) {
$this->env = array();
foreach ($env as $key => $value) {
@@ -359,6 +359,13 @@ class Process
*/
public function getWorkingDirectory()
{
+ // This is for BC only
+ if (null === $this->cwd) {
+ // getcwd() will return false if any one of the parent directories does not have
+ // the readable or search mode set, even if the current directory does
+ return getcwd() ?: null;
+ }
+
return $this->cwd;
}
|
[Process] In edge cases `getcwd()` can return `false`, then `proc_open()` should get `null` to use default value (the working dir of the current PHP process)
|
diff --git a/salt/grains/core.py b/salt/grains/core.py
index <HASH>..<HASH> 100644
--- a/salt/grains/core.py
+++ b/salt/grains/core.py
@@ -813,7 +813,10 @@ def hostname():
# domain
grains = {}
grains['localhost'] = socket.gethostname()
- grains['fqdn'] = socket.getfqdn()
+ if (re.search("\.", socket.getfqdn())):
+ grains['fqdn'] = socket.getfqdn()
+ else :
+ grains['fqdn'] = grains['localhost']
(grains['host'], grains['domain']) = grains['fqdn'].partition('.')[::2]
return grains
|
grains/core : fix fqdn / domain return on SunOS systems
getfqdn() on Solaris platforms returns the unqualified hostname. In
that case, using gethostname() could be a solution.
Tested on SmartOS / Solaris <I>
|
diff --git a/webpack.config.js b/webpack.config.js
index <HASH>..<HASH> 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -24,7 +24,10 @@ module.exports = {
},
{
test: /\.(css|less)$/,
- loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
+ loader: ExtractTextPlugin.extract(
+ 'style-loader',
+ 'css-loader?localIdentName=[name]-[local]-[hash:base64:8]'
+ ),
},
{test: /\.less$/, loader: 'less-loader'},
{test: /\.(woff|eot)$/, loader: "file-loader"},
|
Set localIdentName for css-loader.
|
diff --git a/tests/model/DataListTest.php b/tests/model/DataListTest.php
index <HASH>..<HASH> 100644
--- a/tests/model/DataListTest.php
+++ b/tests/model/DataListTest.php
@@ -394,13 +394,6 @@ class DataListTest extends SapphireTest {
// $this->assertEquals('Joe', $list->Last()->Name, 'Last comment should be from Joe');
// }
- public function testSimpleNegationFilter() {
- $list = DataObjectTest_TeamComment::get();
- $list = $list->filter('TeamID:Negation', $this->idFromFixture('DataObjectTest_Team', 'team1'));
- $this->assertEquals(1, $list->count());
- $this->assertEquals('Phil', $list->first()->Name, 'First comment should be from Bob');
- }
-
public function testSimplePartialMatchFilter() {
$list = DataObjectTest_TeamComment::get();
$list = $list->filter('Name:PartialMatch', 'o')->sort('Name');
|
Removed test for deprecated NegationFilter
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -6,6 +6,7 @@ window.Promise = Promise;
import 'isomorphic-fetch';
import UI from 'reapp-ui';
+import Helpers from 'reapp-ui/helpers';
import 'reapp-object-assign';
// data
@@ -66,9 +67,10 @@ module.exports = Object.assign(
store,
Store,
- // theme
+ // UI
theme,
makeStyles: UI.makeStyles,
+ Helpers,
// router
Router,
|
export helpers from reapp-ui
|
diff --git a/tests/Unit/ConnectionTest.php b/tests/Unit/ConnectionTest.php
index <HASH>..<HASH> 100644
--- a/tests/Unit/ConnectionTest.php
+++ b/tests/Unit/ConnectionTest.php
@@ -62,7 +62,7 @@ class ConnectionTest extends \PHPUnit_Framework_TestCase
$options = new ConnectionOptions();
if (!self::$isGnatsd) {
time_nanosleep(1, 700000000);
- $options->port = 4222;
+ $options->setPort(4222);
}
$this->c = new Nats\Connection($options);
$this->c->connect();
|
Fixed a broken unit test. Changed direct variable assignation to a setter
|
diff --git a/beets/mediafile.py b/beets/mediafile.py
index <HASH>..<HASH> 100644
--- a/beets/mediafile.py
+++ b/beets/mediafile.py
@@ -1481,10 +1481,14 @@ class MediaFile(object):
)
comments = MediaField(
MP3DescStorageStyle(key='COMM'),
+ MP3DescStorageStyle(key='COMM', desc=u'ID3v1 Comment'),
+ MP3DescStorageStyle(key='COMM', desc=u'Comment'),
+ MP3DescStorageStyle(key='COMM', desc=u'Track:Comments'),
MP4StorageStyle("\xa9cmt"),
StorageStyle('DESCRIPTION'),
StorageStyle('COMMENT'),
ASFStorageStyle('WM/Comments'),
+ StorageStyle('Description')
)
bpm = MediaField(
MP3StorageStyle('TBPM'),
|
added some more storage styles for comment fields
Original: beetbox/beets@<I>ef<I>
|
diff --git a/lib/rufus/lua/state.rb b/lib/rufus/lua/state.rb
index <HASH>..<HASH> 100644
--- a/lib/rufus/lua/state.rb
+++ b/lib/rufus/lua/state.rb
@@ -424,6 +424,7 @@ module Rufus::Lua
if lua_code == nil
+ Lib.lua_remove(@pointer, @error_handler) if @error_handler > 0
@error_handler = 0
elsif lua_code == :traceback
diff --git a/spec/error_handler_spec.rb b/spec/error_handler_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/error_handler_spec.rb
+++ b/spec/error_handler_spec.rb
@@ -47,6 +47,8 @@ stack traceback:
[string "mystuff.lua:77"]:3: in function 'f'
[string "mymain.lua:88"]:1: in main chunk' (2 LUA_ERRRUN)
}.strip)
+
+ expect(@s.send(:stack_top)).to eq(1)
end
it 'set the error handler in a permanent way' do
@@ -167,6 +169,7 @@ stack traceback:
end
expect(le.msg).to eq('[string "line"]:1: b')
+ expect(@s.send(:stack_top)).to eq(0)
end
end
end
|
remove error_handler from stack when unsetting it
for gh-<I>
|
diff --git a/spyderlib/widgets/editor.py b/spyderlib/widgets/editor.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/editor.py
+++ b/spyderlib/widgets/editor.py
@@ -1096,8 +1096,9 @@ class EditorStack(QWidget):
print >>STDOUT, "current_changed:", index, self.data[index].editor,
print >>STDOUT, self.data[index].editor.get_document_id()
- self.emit(SIGNAL('current_file_changed(QString,int)'),
- self.data[index].filename, editor.get_position('cursor'))
+ if editor is not None:
+ self.emit(SIGNAL('current_file_changed(QString,int)'),
+ self.data[index].filename, editor.get_position('cursor'))
def _get_previous_file_index(self):
if len(self.stack_history) > 1:
|
Editor/bugfix: an error occured when closing the last opened file (this bug was introduced when implementing the cursor position history feature)
|
diff --git a/course/reset.php b/course/reset.php
index <HASH>..<HASH> 100644
--- a/course/reset.php
+++ b/course/reset.php
@@ -46,7 +46,6 @@ $strreset = get_string('reset');
$strresetcourse = get_string('resetcourse');
$strremove = get_string('remove');
-$PAGE->navbar->add($strresetcourse);
$PAGE->set_title($course->fullname.': '.$strresetcourse);
$PAGE->set_heading($course->fullname.': '.$strresetcourse);
|
MDL-<I> course: Update breadcrumb nodes in the course reset page
|
diff --git a/easy_thumbnails/files.py b/easy_thumbnails/files.py
index <HASH>..<HASH> 100644
--- a/easy_thumbnails/files.py
+++ b/easy_thumbnails/files.py
@@ -176,7 +176,7 @@ class ThumbnailFile(ImageFieldFile):
return self._file
def _set_file(self, value):
- if not isinstance(value, File):
+ if value is None and not isinstance(value, File):
value = File(value)
self._file = value
self._committed = False
|
If ThumbnailFile.file is set to None, don't try to wrap it in a File class. Fixes #<I>
|
diff --git a/pycm/pycm_overall_func.py b/pycm/pycm_overall_func.py
index <HASH>..<HASH> 100644
--- a/pycm/pycm_overall_func.py
+++ b/pycm/pycm_overall_func.py
@@ -838,7 +838,6 @@ def overall_statistics(**kwargs):
"FNR Micro": complement(TPR_PPV_F1_micro),
"PPV Micro": TPR_PPV_F1_micro,
"F1 Micro": TPR_PPV_F1_micro,
- "F1 Weighted" : weighted_calc(kwargs["F1"],kwargs["P"]),
"Scott PI": PI,
"Gwet AC1": AC1,
"Bennett S": S,
|
removed old lines from pycm_overall_func.py
|
diff --git a/intranet/apps/users/views.py b/intranet/apps/users/views.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/users/views.py
+++ b/intranet/apps/users/views.py
@@ -117,9 +117,9 @@ def picture_view(request, user_id, year=None):
data = None
if data is None:
- image_buffer = io.BytesIO(data)
- else:
img = io.open(default_image_path, mode="rb").read()
+ else:
+ image_buffer = io.BytesIO(data)
response = HttpResponse(content_type="image/jpeg")
response["Content-Disposition"] = "filename={}_{}.jpg".format(user_id, year or preferred)
|
fix(users): fix image data logic
|
diff --git a/images/spec/features/refinery/admin/images_spec.rb b/images/spec/features/refinery/admin/images_spec.rb
index <HASH>..<HASH> 100644
--- a/images/spec/features/refinery/admin/images_spec.rb
+++ b/images/spec/features/refinery/admin/images_spec.rb
@@ -148,6 +148,12 @@ module Refinery
end
click_button "Save"
+ # check that image loads after it has been updated
+ visit refinery.url_for(page_for_image.url)
+ visit find(:css, 'img[src^="/system/images"]')[:src]
+ page.should have_css('img[src*="/system/images"]')
+ expect { page }.to_not have_content('Not found')
+
# update the image
visit refinery.edit_admin_image_path(image)
attach_file "image_image", Refinery.roots('refinery/images').join("spec/fixtures/beach.jpeg")
@@ -155,7 +161,8 @@ module Refinery
# check that image loads after it has been updated
visit refinery.url_for(page_for_image.url)
- visit find(:css, 'img[src^="/system"]')[:src]
+ visit find(:css, 'img[src^="/system/images"]')[:src]
+ page.should have_css('img[src*="/system/images"]')
expect { page }.to_not have_content('Not found')
end
end
|
Hybrid positive/negative assertion to prove image's presence
|
diff --git a/lib/debugger/xml/multiprocess/monkey.rb b/lib/debugger/xml/multiprocess/monkey.rb
index <HASH>..<HASH> 100644
--- a/lib/debugger/xml/multiprocess/monkey.rb
+++ b/lib/debugger/xml/multiprocess/monkey.rb
@@ -23,7 +23,7 @@ module Debugger
#{private ? "private" : ""}
def exec(*args)
- Debugger.interface.close
+ Debugger.handler.interface.close
pre_debugger_exec(*args)
end
}
@@ -46,4 +46,4 @@ module Process
module_eval Debugger::Xml::MultiProcess.create_mp_fork
module_eval Debugger::Xml::MultiProcess.create_mp_exec
end
-end
\ No newline at end of file
+end
|
Correct way to close interface before calling #exec
|
diff --git a/test/OfferCommandHandlerTestTrait.php b/test/OfferCommandHandlerTestTrait.php
index <HASH>..<HASH> 100644
--- a/test/OfferCommandHandlerTestTrait.php
+++ b/test/OfferCommandHandlerTestTrait.php
@@ -147,15 +147,20 @@ trait OfferCommandHandlerTestTrait
new String('Bart Ramakers'),
Url::fromNative('http://foo.bar/media/de305d54-75b4-431b-adb2-eb6b9e546014.png')
);
+ $imageAddedEventClass = $this->getEventClass('ImageAdded');
$commandClass = $this->getCommandClass('RemoveImage');
$eventClass = $this->getEventClass('ImageRemoved');
$this->scenario
->withAggregateId($id)
->given(
- [$this->factorOfferCreated($id)]
+ [
+ $this->factorOfferCreated($id),
+ new $imageAddedEventClass($id, $image),
+ ]
)
->when(
+
new $commandClass($id, $image)
)
->then([new $eventClass($id, $image)]);
|
III-<I>: Fix image removal test in command handler: the image should have been added first
|
diff --git a/pypeerassets/providers/mintr.py b/pypeerassets/providers/mintr.py
index <HASH>..<HASH> 100644
--- a/pypeerassets/providers/mintr.py
+++ b/pypeerassets/providers/mintr.py
@@ -30,6 +30,9 @@ class Mintr:
def wrapper(raw):
'''make Mintr API response just like RPC response'''
+ raw["blocktime"] = raw["time"]
+ raw.pop("time")
+
for v in raw["vout"]:
v["scriptPubKey"] = {"asm": v["asm"], "hex": v["hex"],
"type": v["type"], "reqSigs": v["reqsigs"],
|
Mintr: time -> blocktime
|
diff --git a/rescan.go b/rescan.go
index <HASH>..<HASH> 100644
--- a/rescan.go
+++ b/rescan.go
@@ -510,9 +510,26 @@ func rescan(chain ChainSource, options ...RescanOption) error {
)
}
- // If we're actually scanning and we have a non-empty watch
- // list, then we'll attempt to fetch the filter from the
- // network.
+ // If we're not scanning or our watch list is empty, then we can
+ // just notify the block without fetching any filters/blocks.
+ if !scanning || len(ro.watchList) == 0 {
+ if ro.ntfn.OnFilteredBlockConnected != nil {
+ ro.ntfn.OnFilteredBlockConnected(
+ curStamp.Height, &curHeader, nil,
+ )
+ }
+ if ro.ntfn.OnBlockConnected != nil {
+ ro.ntfn.OnBlockConnected(
+ &curStamp.Hash, curStamp.Height,
+ curHeader.Timestamp,
+ )
+ }
+
+ return nil
+ }
+
+ // Otherwise, we'll attempt to fetch the filter to retrieve the
+ // relevant transactions and notify them.
queryOptions := NumRetries(0)
blockFilter, err := chain.GetCFilter(
curStamp.Hash, wire.GCSFilterRegular, queryOptions,
|
rescan: prevent unnecessarily fetching filter for block connected
In this commit, we introduce a slight optimization to prevent fetching a
block filter and its accompanying block when we're not scanning or our
watch list is empty.
|
diff --git a/lib/ahoy/tracker.rb b/lib/ahoy/tracker.rb
index <HASH>..<HASH> 100644
--- a/lib/ahoy/tracker.rb
+++ b/lib/ahoy/tracker.rb
@@ -160,7 +160,7 @@ module Ahoy
def visit_token_helper
@visit_token_helper ||= begin
token = existing_visit_token
- token ||= generate_id
+ token ||= generate_id unless Ahoy.api_only
token
end
end
@@ -168,7 +168,7 @@ module Ahoy
def visitor_token_helper
@visitor_token_helper ||= begin
token = existing_visitor_token
- token ||= generate_id
+ token ||= generate_id unless Ahoy.api_only
token
end
end
|
Fixed regression with server not generating visit and visitor tokens, part 2
|
diff --git a/psamm/datasource/modelseed.py b/psamm/datasource/modelseed.py
index <HASH>..<HASH> 100644
--- a/psamm/datasource/modelseed.py
+++ b/psamm/datasource/modelseed.py
@@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with PSAMM. If not, see <http://www.gnu.org/licenses/>.
#
-# Copyright 2014-2015 Jon Lund Steffensen <jon_steffensen@uri.edu>
+# Copyright 2014-2016 Jon Lund Steffensen <jon_steffensen@uri.edu>
"""Module related to loading ModelSEED database files."""
@@ -21,6 +21,7 @@ import csv
import re
from .context import FileMark
+from .entry import CompoundEntry as BaseCompoundEntry
class ParseError(Exception):
@@ -33,7 +34,7 @@ def decode_name(s):
return re.sub(r'&#(\d+);', lambda x: chr(int(x.group(1))), s)
-class CompoundEntry(object):
+class CompoundEntry(BaseCompoundEntry):
"""Representation of entry in a ModelSEED compound table"""
def __init__(self, id, names, formula, filemark=None):
|
modelseed: Use CompoundEntry base class
|
diff --git a/src/Storage/Database/Schema/Comparison/BaseComparator.php b/src/Storage/Database/Schema/Comparison/BaseComparator.php
index <HASH>..<HASH> 100644
--- a/src/Storage/Database/Schema/Comparison/BaseComparator.php
+++ b/src/Storage/Database/Schema/Comparison/BaseComparator.php
@@ -71,4 +71,28 @@ abstract class BaseComparator
return $this->pending;
}
+
+ /**
+ * Run the update checks and flag if we need an update.
+ *
+ * @param boolean $force
+ *
+ * @return SchemaCheck
+ */
+ public function compare($force = false)
+ {
+ if ($this->response !== null && $force === false) {
+ return $this->getResponse();
+ }
+
+ $this->checkTables();
+
+ // If we have diffs, check if they need to be modified
+ if ($this->diffs !== null) {
+ $this->adjustDiffs();
+ $this->addAlterResponses();
+ }
+
+ return $this->getResponse();
+ }
}
|
Execute update checks and flag update requirements
|
diff --git a/tests/test_settings.py b/tests/test_settings.py
index <HASH>..<HASH> 100644
--- a/tests/test_settings.py
+++ b/tests/test_settings.py
@@ -9,3 +9,7 @@ DATABASES = {
'ENGINE': 'django.db.backends.sqlite3',
}
}
+
+PASSWORD_HASHERS = (
+ 'django.contrib.auth.hashers.MD5PasswordHasher',
+)
|
use md5 password hasher to speed up the tests
|
diff --git a/src/naarad/metrics/metric.py b/src/naarad/metrics/metric.py
index <HASH>..<HASH> 100644
--- a/src/naarad/metrics/metric.py
+++ b/src/naarad/metrics/metric.py
@@ -170,8 +170,7 @@ class Metric(object):
def calculate_stats(self):
stats_to_calculate = ['mean', 'std', 'min', 'max'] # TODO: get input from user
- percentiles_to_calculate = range(5, 101, 5) # TODO: get input from user
- percentiles_to_calculate.append(99)
+ percentiles_to_calculate = range(0, 100, 1) # TODO: get input from user
headers = CONSTANTS.SUBMETRIC_HEADER + ',mean,std,p50,p75,p90,p95,p99,min,max\n' # TODO: This will be built from user input later on
metric_stats_csv_file = self.get_stats_csv()
imp_metric_stats_csv_file = self.get_important_sub_metrics_csv()
|
finer grain (1 percent) CDF support instead of 5 percent
|
diff --git a/src/frontend/org/voltdb/CSVSnapshotFilter.java b/src/frontend/org/voltdb/CSVSnapshotFilter.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/CSVSnapshotFilter.java
+++ b/src/frontend/org/voltdb/CSVSnapshotFilter.java
@@ -68,6 +68,7 @@ public class CSVSnapshotFilter implements SnapshotDataFilter {
cont.b.limit(cont.b.limit() + 4);
final int rowCount = cont.b.getInt();
buf.putInt(rowCountPosition, rowCount);
+ buf.flip();
VoltTable vt = PrivateVoltTableFactory.createVoltTableFromBuffer(buf, true);
Pair<Integer, byte[]> p =
|
Add a defensive flip based on Ning's feedback. If it is correctly sized it isn't necessary, but it doesn't hurt.
|
diff --git a/lib/minitest/rake_ci.rb b/lib/minitest/rake_ci.rb
index <HASH>..<HASH> 100644
--- a/lib/minitest/rake_ci.rb
+++ b/lib/minitest/rake_ci.rb
@@ -1,6 +1,9 @@
require 'minitest'
-# Autodiscover the _plugin.rb file:
-Minitest.load_plugins
-Minitest::RakeCIReporter.enable!
+# Don't trigger full plugin autodiscovery, as we load this
+# file through RUBYOPT extension (and full autodiscovery can
+# lead to e.g. incomplete definitions of Rails existing).
+require_relative 'rake_ci_plugin'
+Minitest.extensions << 'rake_ci'
+Minitest::RakeCIReporter.enable!
|
# avoid triggering a minitest autodiscover in all spawned shells
Would lead to Rails being partially loaded in spawned Ruby process, breaking e.g. webpacker asset compilation
|
diff --git a/angr/analyses/cfg/indirect_jump_resolvers/jumptable.py b/angr/analyses/cfg/indirect_jump_resolvers/jumptable.py
index <HASH>..<HASH> 100644
--- a/angr/analyses/cfg/indirect_jump_resolvers/jumptable.py
+++ b/angr/analyses/cfg/indirect_jump_resolvers/jumptable.py
@@ -4,6 +4,7 @@ from collections import defaultdict
import pyvex
+from ....errors import AngrError, SimError
from ....blade import Blade
from ....annocfg import AnnotatedCFG
from .... import sim_options as o
@@ -151,7 +152,12 @@ class JumpTableResolver(IndirectJumpResolver):
# Get the jumping targets
for r in slicecutor.reached_targets:
- succ = project.factory.successors(r)
+ try:
+ succ = project.factory.successors(r)
+ except (AngrError, SimError):
+ # oops there are errors
+ l.warning('Cannot get jump successor states from a path that has reached the target. Skip it.')
+ continue
all_states = succ.flat_successors + succ.unconstrained_successors
if not all_states:
l.warning("Slicecutor failed to execute the program slice. No output state is available.")
|
JumpTableResolver: Catch AngrError and SimError after stepping a path.
|
diff --git a/bin/screenstory.js b/bin/screenstory.js
index <HASH>..<HASH> 100755
--- a/bin/screenstory.js
+++ b/bin/screenstory.js
@@ -30,7 +30,7 @@ function collect(val, memo) {
}
program
- .version('0.0.1')
+ .version(require('package.json').version)
.usage('[options] <files ...>')
.option('-p, --project-name <No Project>', 'Add a project name to story Ids', 'No Project')
|
Use package.json version in bin script
|
diff --git a/examples/src/main/java/alluxio/examples/keyvalue/KeyValueStoreOperations.java b/examples/src/main/java/alluxio/examples/keyvalue/KeyValueStoreOperations.java
index <HASH>..<HASH> 100644
--- a/examples/src/main/java/alluxio/examples/keyvalue/KeyValueStoreOperations.java
+++ b/examples/src/main/java/alluxio/examples/keyvalue/KeyValueStoreOperations.java
@@ -133,7 +133,7 @@ public final class KeyValueStoreOperations implements Callable<Boolean> {
if (!Configuration.getBoolean(Constants.KEY_VALUE_ENABLED)) {
System.out.println("Alluxio key value service is disabled. To run this test, please set "
- + Constants.KEY_VALUE_ENABLED + " to be true, restart the cluster");
+ + Constants.KEY_VALUE_ENABLED + " to be true and restart the cluster.");
System.exit(-1);
}
|
[SMALLFIX] Address comments
|
diff --git a/extraslibs/src/com/atlantbh/jmeter/plugins/jsonutils/jsonpathassertion/JSONPathAssertion.java b/extraslibs/src/com/atlantbh/jmeter/plugins/jsonutils/jsonpathassertion/JSONPathAssertion.java
index <HASH>..<HASH> 100644
--- a/extraslibs/src/com/atlantbh/jmeter/plugins/jsonutils/jsonpathassertion/JSONPathAssertion.java
+++ b/extraslibs/src/com/atlantbh/jmeter/plugins/jsonutils/jsonpathassertion/JSONPathAssertion.java
@@ -72,8 +72,8 @@ public class JSONPathAssertion extends AbstractTestElement implements Serializab
if (expectedValue.equalsIgnoreCase(JsonPath.read(jsonString, jsonPath).toString())) {
return true;
} else {
- throw new Exception(String.format("Response doesn't contain expected value. Expected \"%s\" but was \"%s\"!",
- expectedValue, actualValue));
+ throw new Exception(String.format("Path \"%s\" doesn't contain expected value. Expected \"%s\" but was \"%s\"!",
+ jsonPath, expectedValue, actualValue));
}
}
|
Improved JsonAssertion
Tell the user which path was being evaluated
|
diff --git a/xml/node.go b/xml/node.go
index <HASH>..<HASH> 100644
--- a/xml/node.go
+++ b/xml/node.go
@@ -245,8 +245,3 @@ quit:
func Parse(r io.Reader) (*Node, error) {
return parse(r)
}
-
-// ParseXML returns the parse tree for the XML from the given Reader.Deprecated.
-func ParseXML(r io.Reader) (*Node, error) {
- return parse(r)
-}
|
refactor: remove ParseXML() method
|
diff --git a/python/ray/data/impl/progress_bar.py b/python/ray/data/impl/progress_bar.py
index <HASH>..<HASH> 100644
--- a/python/ray/data/impl/progress_bar.py
+++ b/python/ray/data/impl/progress_bar.py
@@ -1,6 +1,7 @@
from typing import List, Any
import ray
+from ray.ray_constants import env_integer
from ray.types import ObjectRef
from ray.util.annotations import PublicAPI
@@ -12,13 +13,18 @@ except ImportError:
needs_warning = True
# Whether progress bars are enabled in this process.
-_enabled: bool = True
+_enabled: bool = not bool(env_integer("RAY_DATA_DISABLE_PROGRESS_BARS", 0))
@PublicAPI
def set_progress_bars(enabled: bool) -> bool:
"""Set whether progress bars are enabled.
+ The default behavior is controlled by the
+ ``RAY_DATA_DISABLE_PROGRESS_BARS`` environment variable. By default,
+ it is set to "0". Setting it to "1" will disable progress bars, unless
+ they are reenabled by this method.
+
Returns:
Whether progress bars were previously enabled.
"""
|
[datasets] Add an env var for progress bar behavior (#<I>)
Adds a RAY_DATA_DISABLE_PROGRESS_BARS env var to control the default progress bar behavior. The default value is "0". Setting it to "1" disables progress bars, unless they are reenabled again by the set_progress_bars method.
|
diff --git a/upload/admin/controller/user/user.php b/upload/admin/controller/user/user.php
index <HASH>..<HASH> 100644
--- a/upload/admin/controller/user/user.php
+++ b/upload/admin/controller/user/user.php
@@ -125,7 +125,7 @@ class User extends \Opencart\System\Engine\Controller {
}
if (isset($this->request->get['page'])) {
- $page = $this->request->get['page'];
+ $page = (int)$this->request->get['page'];
} else {
$page = 1;
}
@@ -490,4 +490,4 @@ class User extends \Opencart\System\Engine\Controller {
return !$this->error;
}
-}
\ No newline at end of file
+}
|
Added integer on $page get request.
|
diff --git a/intranet/apps/bus/serializers.py b/intranet/apps/bus/serializers.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/bus/serializers.py
+++ b/intranet/apps/bus/serializers.py
@@ -1,3 +1,4 @@
+# pylint: disable=abstract-method
from rest_framework import serializers
from .models import Route
diff --git a/intranet/apps/eighth/serializers.py b/intranet/apps/eighth/serializers.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/eighth/serializers.py
+++ b/intranet/apps/eighth/serializers.py
@@ -1,3 +1,4 @@
+# pylint: disable=abstract-method
import collections
import functools
import logging
diff --git a/intranet/apps/users/serializers.py b/intranet/apps/users/serializers.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/users/serializers.py
+++ b/intranet/apps/users/serializers.py
@@ -1,3 +1,4 @@
+# pylint: disable=abstract-method
from django.contrib.auth import get_user_model
from rest_framework import serializers
|
chore(pylint): disable abstract method checks for serializers
|
diff --git a/src/App.php b/src/App.php
index <HASH>..<HASH> 100644
--- a/src/App.php
+++ b/src/App.php
@@ -205,19 +205,19 @@ class App
}
/**
- * @param bool $from_shutdown
+ * @param bool $for_shutdown if true will not pass in caughtException method.
*
* @throws ExitApplicationException
* @throws \atk4\core\Exception
*/
- public function callExit($from_shutdown = false)
+ public function callExit($for_shutdown = false)
{
if (!$this->exit_called) {
$this->exit_called = true;
$this->hook('beforeExit');
}
- if ($from_shutdown) {
+ if ($for_shutdown) {
return;
}
@@ -232,6 +232,7 @@ class App
* @param Throwable $exception
*
* @throws \atk4\core\Exception
+ * @throws ExitApplicationException
*
* @return bool
*/
@@ -253,7 +254,6 @@ class App
$l->initLayout('Centered');
// -- CHECK ERROR BY TYPE
-
switch (true) {
case $exception instanceof \atk4\core\Exception:
@@ -284,7 +284,7 @@ class App
$this->run_called = true;
}
- $this->callExit();
+ $this->callExit(true);
return true;
}
|
Add some comment to callExit method
|
diff --git a/Tests/Twig/Extension/CSS/TypographyTwigExtensionTest.php b/Tests/Twig/Extension/CSS/TypographyTwigExtensionTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Twig/Extension/CSS/TypographyTwigExtensionTest.php
+++ b/Tests/Twig/Extension/CSS/TypographyTwigExtensionTest.php
@@ -25,6 +25,18 @@ use WBW\Bundle\BootstrapBundle\Twig\Extension\CSS\TypographyTwigExtension;
class TypographyTwigExtensionTest extends AbstractTestCase {
/**
+ * Tests the __construct() method.
+ *
+ * @return void
+ */
+ public function testConstruct() {
+
+ $obj = new TypographyTwigExtension($this->twigEnvironment);
+
+ $this->assertEquals("webeweb.bootstrap.twig.extension.css.typography", TypographyTwigExtension::SERVICE_NAME);
+ $this->assertSame($this->twigEnvironment, $obj->getTwigEnvironment());
+ }
+ /**
* Tests the getFunctions() method.
*
* @return void
|
Complete Typography Twig extension unit tests
|
diff --git a/syntax/lexer.go b/syntax/lexer.go
index <HASH>..<HASH> 100644
--- a/syntax/lexer.go
+++ b/syntax/lexer.go
@@ -676,7 +676,7 @@ func (p *parser) newLit(r rune) {
if r <= utf8.RuneSelf {
p.litBs = p.litBuf[:1]
p.litBs[0] = byte(r)
- } else {
+ } else if p.npos < len(p.bs) {
w := utf8.RuneLen(r)
p.litBs = append(p.litBuf[:0], p.bs[p.npos-w:p.npos]...)
}
diff --git a/syntax/parser_test.go b/syntax/parser_test.go
index <HASH>..<HASH> 100644
--- a/syntax/parser_test.go
+++ b/syntax/parser_test.go
@@ -785,6 +785,10 @@ var shellTests = []errorCase{
`if; then bar; fi; ;`,
`1:19: ; can only immediately follow a statement`,
},
+ {
+ "<<$\xc8",
+ `1:3: expansions not allowed in heredoc words`,
+ },
}
func checkError(in, want string, mode ParseMode) func(*testing.T) {
|
syntax: don't slice past p.bs in p.newLit
If we see encounter an error right before its call, p.npos might be set
to len(p.bs)<I>.
|
diff --git a/client/state/jetpack-connect/reducer/schema.js b/client/state/jetpack-connect/reducer/schema.js
index <HASH>..<HASH> 100644
--- a/client/state/jetpack-connect/reducer/schema.js
+++ b/client/state/jetpack-connect/reducer/schema.js
@@ -34,9 +34,15 @@ export const jetpackAuthAttemptsSchema = {
patternProperties: {
'^.+$': {
type: 'object',
+ additionalProperties: false,
required: [ 'attempt', 'timestamp' ],
- attempt: { type: 'integer' },
- timestamp: { type: 'integer' },
+ properties: {
+ attempt: {
+ type: 'integer',
+ minimum: 0,
+ },
+ timestamp: { type: 'integer' },
+ },
},
},
};
|
Fix schema properties and improve precision (#<I>)
Properties were not being validated, they must be in a properties
object.
Add `additionalProperties: false`.
Add `minimum: 0` to attempts.
|
diff --git a/lib/bmc-daemon-lib/mq_consumer.rb b/lib/bmc-daemon-lib/mq_consumer.rb
index <HASH>..<HASH> 100644
--- a/lib/bmc-daemon-lib/mq_consumer.rb
+++ b/lib/bmc-daemon-lib/mq_consumer.rb
@@ -37,18 +37,17 @@ module BmcDaemonLib
raise MqConsumerException, error
end
- # Link or create exchange
+ # Bind on topic exchange, if exists
exchange = @channel.topic(topic, durable: true)
# puts "listen_to(#{topic},#{rkey})"
- @queue.bind exchange, routing_key: rkey
+ @queue.bind topic, routing_key: rkey
# Handle errors
- # rescue Bunny::NotFound => e
- # log_debug "creating missing exchange [#{topic}]"
- # @channel.topic topic, durable: false, auto_delete: true
- # retry
- # # raise MqConsumerTopicNotFound, e.message
+ rescue Bunny::NotFound => e
+ log_debug "missing exchange [#{topic}]"
+ #@channel.topic topic, durable: false, auto_delete: true
+ raise MqConsumerTopicNotFound, e.message
rescue StandardError => e
log_error "UNEXPECTED: #{e.inspect}"
|
consumer: don't try to create exchange if missing (revert behaviour change)
|
diff --git a/lib/better_errors/repl/pry.rb b/lib/better_errors/repl/pry.rb
index <HASH>..<HASH> 100644
--- a/lib/better_errors/repl/pry.rb
+++ b/lib/better_errors/repl/pry.rb
@@ -5,11 +5,7 @@ module BetterErrors
module REPL
class Pry
class Input
- def initialize(fiber)
- @fiber = fiber
- end
-
- def readline(*args)
+ def readline
Fiber.yield
end
end
@@ -41,7 +37,7 @@ module BetterErrors
@fiber = Fiber.new do
@pry.repl @binding
end
- @input = Input.new @fiber
+ @input = Input.new
@output = Output.new
@pry = ::Pry.new input: @input, output: @output
@pry.hooks.clear_all
|
clean up unused code in Input class
|
diff --git a/leancloud/file_.py b/leancloud/file_.py
index <HASH>..<HASH> 100644
--- a/leancloud/file_.py
+++ b/leancloud/file_.py
@@ -56,6 +56,7 @@ class File(object):
try:
data.read
data.tell
+ data.seek(0, os.SEEK_END)
data.seek(0, os.SEEK_SET)
except Exception:
if (six.PY3 and isinstance(data, (memoryview, bytes))) or \
@@ -64,10 +65,7 @@ class File(object):
elif data.read:
data = io.BytesIO(data.read())
else:
- raise Exception('Do not know how to handle data, accepts file like object or bytes')
-
- data.seek(0, os.SEEK_END)
- self._metadata['size'] = data.tell()
+ raise TypeError('Do not know how to handle data, accepts file like object or bytes')
data.seek(0, os.SEEK_SET)
checksum = hashlib.md5()
@@ -78,6 +76,8 @@ class File(object):
checksum.update(chunk)
self._metadata['_checksum'] = checksum.hexdigest()
+ self._metadata['size'] = data.tell()
+
data.seek(0, os.SEEK_SET)
self._source = data
|
:ok_hand: Comply review suggestions
|
diff --git a/sqlite3.go b/sqlite3.go
index <HASH>..<HASH> 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -51,7 +51,7 @@ func (s sqlite3) HasTable(scope *Scope, tableName string) bool {
func (s sqlite3) HasColumn(scope *Scope, tableName string, columnName string) bool {
var count int
- s.RawScanInt(scope, &count, fmt.Sprintf("SELECT count(*) FROM sqlite_master WHERE tbl_name = ? AND (sql LIKE '%%(\"%v\" %%' OR sql LIKE '%%,\"%v\" %%' OR sql LIKE '%%( %v %%' OR sql LIKE '%%, %v %%');\n", columnName, columnName, columnName, columnName), tableName)
+ s.RawScanInt(scope, &count, fmt.Sprintf("SELECT count(*) FROM sqlite_master WHERE tbl_name = ? AND (sql LIKE '%%(\"%v\" %%' OR sql LIKE '%%,\"%v\" %%' OR sql LIKE '%%, \"%v\" %%' OR sql LIKE '%%( %v %%' OR sql LIKE '%%, %v %%' OR sql LIKE '%%,%v %%');\n", columnName, columnName, columnName, columnName, columnName, columnName), tableName)
return count > 0
}
|
sqlite3: fix HasColumn - problem with detecting columns
Handle table definitions like ", \"col"" and ",col".
|
diff --git a/tasks/faker.js b/tasks/faker.js
index <HASH>..<HASH> 100644
--- a/tasks/faker.js
+++ b/tasks/faker.js
@@ -11,9 +11,9 @@
module.exports = function(grunt) {
var path = require('path');
- var faker = require('faker');
+ var Faker = require('Faker');
- // Loop through entire json object
+ //FLoop through entire json object
function processJson(obj) {
for (var i in obj) {
if (typeof(obj[i]) === "object") {
@@ -56,11 +56,11 @@ module.exports = function(grunt) {
function executeFunctionByName(functionName, args) {
var namespaces = functionName.split(".");
var nsLength = namespaces.length;
- var context = faker;
- var parentContext = faker;
+ var context = Faker;
+ var parentContext = Faker;
if (namespaces[0].toLowerCase() === 'definitions'){
- grunt.log.warn('The definitions module from faker.js is not avail in this task.');
+ grunt.log.warn('The definitions module from Faker.js is not avail in this task.');
return;
}
|
Mke sure FakerJs is referred to with cap
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,7 @@ setup(name='fontaine',
author_email='dave@lab6.com',
url='https://github.com/davelab6/pyfontaine',
# more examples here http://docs.python.org/distutils/examples.html#pure-python-distribution-by-package
- packages=['fontaine', 'fontaine.charmaps', 'fontaine.structures'],
+ packages=['fontaine', 'fontaine.charmaps', 'fontaine.structures', 'fontaine.ext'],
install_requires=[
'freetype-py',
'lxml',
|
append ext to setup.py packages
|
diff --git a/go/libkb/secret_store_windows.go b/go/libkb/secret_store_windows.go
index <HASH>..<HASH> 100644
--- a/go/libkb/secret_store_windows.go
+++ b/go/libkb/secret_store_windows.go
@@ -100,7 +100,7 @@ func (k WinCredentialStore) migrateSecretStoreFile(g *GlobalContext) error {
}
func NewSecretStoreAll(g *GlobalContext) SecretStoreAll {
- if g.Env.ForceSecretStoreFile() || !g.Env.GetFeatureFlags().Admin() {
+ if g.Env.ForceSecretStoreFile() {
// Allow use of file secret store for development/testing
return NewSecretStoreFile(g.Env.GetDataDir())
}
|
don't gate wincred use on admin flag (#<I>)
|
diff --git a/dallinger/experiment_server/experiment_server.py b/dallinger/experiment_server/experiment_server.py
index <HASH>..<HASH> 100644
--- a/dallinger/experiment_server/experiment_server.py
+++ b/dallinger/experiment_server/experiment_server.py
@@ -66,7 +66,7 @@ else:
@app.route('/')
def index():
"""Index route"""
- return render_template('default.html')
+ abort(404)
@app.route('/robots.txt')
diff --git a/tests/test_experiment_server.py b/tests/test_experiment_server.py
index <HASH>..<HASH> 100644
--- a/tests/test_experiment_server.py
+++ b/tests/test_experiment_server.py
@@ -54,9 +54,9 @@ class TestExperimentServer(FlaskAppTest):
participant = Participant.query.get(participant_id)
participant.status = status
- def test_default(self):
+ def test_root(self):
resp = self.app.get('/')
- assert 'Welcome to Dallinger!' in resp.data
+ assert resp.status_code == 404
def test_favicon(self):
resp = self.app.get('/favicon.ico')
|
Return <I> instead of non-existent template
Closes #<I>. (Eventually, this should return the ad page with random
credentials.)
|
diff --git a/treeherder/config/settings.py b/treeherder/config/settings.py
index <HASH>..<HASH> 100644
--- a/treeherder/config/settings.py
+++ b/treeherder/config/settings.py
@@ -246,13 +246,15 @@ SILENCED_SYSTEM_CHECKS = [
# User Agents
# User agents which will be blocked from making requests to the site.
DISALLOWED_USER_AGENTS = (
+ re.compile(r'^Go-http-client/'),
+ # This was the old Go http package user agent prior to Go-http-client/*
+ # https://github.com/golang/go/commit/0d1ceef9452c495b6f6d60e578886689184e5e4b
+ re.compile(r'^Go 1.1 package http'),
# Note: This intentionally does not match the command line curl
# tool's default User Agent, only the library used by eg PHP.
re.compile(r'^libcurl/'),
re.compile(r'^Python-urllib/'),
re.compile(r'^python-requests/'),
- # ActiveData blocked for excessive API requests (bug 1289830)
- re.compile(r'^ActiveData-ETL'),
)
|
Bug <I> - Update list of blocked User Agents (#<I>)
These Golang related User Agents are accessing only the site root and
robots.txt, so safe to block. The ActiveData UA block can be removed,
since ActiveData no longer makes requests to our API.
|
diff --git a/txtorcon/torcontrolprotocol.py b/txtorcon/torcontrolprotocol.py
index <HASH>..<HASH> 100644
--- a/txtorcon/torcontrolprotocol.py
+++ b/txtorcon/torcontrolprotocol.py
@@ -713,7 +713,7 @@ class TorControlProtocol(LineOnlyReceiver):
d.addErrback(self._auth_failed)
return
- if self.password_function and 'HASHEDPASSWORD' in methods:
+ if self.password_function and 'HASHEDPASSWORD' in methods or 'PASSWORD' in methods:
d = defer.maybeDeferred(self.password_function)
d.addCallback(self._do_password_authentication)
d.addErrback(self._auth_failed)
|
Allow method 'PASSWORD' in addition to 'HASHEDPASSWORD' for password authentication
|
diff --git a/src/Phlexible/Bundle/FrontendMediaBundle/Controller/MediaController.php b/src/Phlexible/Bundle/FrontendMediaBundle/Controller/MediaController.php
index <HASH>..<HASH> 100644
--- a/src/Phlexible/Bundle/FrontendMediaBundle/Controller/MediaController.php
+++ b/src/Phlexible/Bundle/FrontendMediaBundle/Controller/MediaController.php
@@ -111,6 +111,7 @@ class MediaController extends Controller
throw $this->createNotFoundException($e->getMessage(), $e);
}
+ // TODO get lates file version
$file = $volume->findFile($fileId);
$filePath = $file->getPhysicalPath();
@@ -145,6 +146,7 @@ class MediaController extends Controller
throw $this->createNotFoundException($e->getMessage(), $e);
}
+ // TODO get lates file version
$file = $volume->findFile($fileId);
$filePath = $file->getPhysicalPath();
@@ -180,6 +182,7 @@ class MediaController extends Controller
throw $this->createNotFoundException($e->getMessage(), $e);
}
+ // TODO get lates file version
$file = $volume->findFile($fileId);
$mimeType = $file->getMimeType();
$mediaType = $mediaTypeManager->findByMimetype($mimeType);
|
Add todos to get latest file version
|
diff --git a/angr/analyses/veritesting.py b/angr/analyses/veritesting.py
index <HASH>..<HASH> 100644
--- a/angr/analyses/veritesting.py
+++ b/angr/analyses/veritesting.py
@@ -269,7 +269,11 @@ class Veritesting(Analysis):
else:
l.debug("Function inlining is disabled.")
+ self._input_path.state.options.add(o.TRACK_ACTION_HISTORY)
result, final_path_group = self._veritesting()
+ self._input_path.state.options.discard(o.TRACK_ACTION_HISTORY)
+ for a in final_path_group.stashes:
+ final_path_group.apply(stash=a, path_func=lambda p: p.state.options.discard(o.TRACK_ACTION_HISTORY))
self.result = {
'result': result,
|
veritesting needs to enable history tracking
|
diff --git a/glim/__init__.py b/glim/__init__.py
index <HASH>..<HASH> 100644
--- a/glim/__init__.py
+++ b/glim/__init__.py
@@ -2,7 +2,6 @@ version = "0.9.4"
from glim import config
from glim import core
-from glim import view
from glim import log
from glim import controller
from glim import ext
@@ -13,8 +12,6 @@ from glim import command
# package shortcuts for easy import
Config = config.ConfigFacade
-View = view.ViewFacade
-
Log = log.LogFacade
GlimLog = log.GlimLogFacade
|
fix glim package not resolving view module
|
diff --git a/run_tests.py b/run_tests.py
index <HASH>..<HASH> 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -58,7 +58,7 @@ def wait_until_stop():
def start_server():
- sys.stderr = open("/dev/null", "w")
+ sys.stderr = open(os.devnull, "w")
env.process = Process(target=start_flask_app, args=(env.host, env.port))
env.process.daemon = True
env.process.start()
|
Replace "/dev/null" with os.devnull (#<I>)
|
diff --git a/tests/viewport-widget.py b/tests/viewport-widget.py
index <HASH>..<HASH> 100755
--- a/tests/viewport-widget.py
+++ b/tests/viewport-widget.py
@@ -23,7 +23,7 @@ for row, col in content.yield_cells():
style = dict(color=glooey.drawing.green)
WidgetClass = glooey.PlaceHolder
- content[row, col] = WidgetClass(width=300, height=300, **style)
+ content[row, col] = WidgetClass(width=300, height=200, **style)
viewport.add(content)
vbox.add(viewport, expand=True)
|
Test a non-square Viewport child.
|
diff --git a/sphinxcontrib/dotnetdomain.py b/sphinxcontrib/dotnetdomain.py
index <HASH>..<HASH> 100644
--- a/sphinxcontrib/dotnetdomain.py
+++ b/sphinxcontrib/dotnetdomain.py
@@ -8,7 +8,7 @@ from itertools import chain
from six import iteritems
-from sphinx import addnodes
+from sphinx import addnodes, version_info as sphinx_version_info
from sphinx.domains import Domain, ObjType, Index
from sphinx.locale import l_
from sphinx.directives import ObjectDescription
@@ -21,6 +21,8 @@ from docutils.parsers.rst import directives
from docutils import nodes
+SPHINX_VERSION_14 = (sphinx_version_info >= (1, 4))
+
# Global regex parsing
_re_parts = {}
_re_parts['type_dimension'] = r'(?:\`\d+)?(?:\`\`\d+)?'
@@ -228,8 +230,10 @@ class DotNetObject(ObjectDescription):
index_text = self.get_index_text(None, name_obj)
if index_text:
- self.indexnode['entries'].append(('single', index_text, full_name,
- ''))
+ entry = ('single', index_text, full_name, '')
+ if SPHINX_VERSION_14:
+ entry = ('single', index_text, full_name, '', None)
+ self.indexnode['entries'].append(entry)
def get_index_text(self, prefix, name_obj):
"""Produce index text by directive attributes"""
|
Add support for sphinx <I> latex writer
Adds support for multiple formats of entry listing for the latex writer. I'm not sure if there is an easy way to mock out the latex builder, it seems to be more complicated than the others.
Fixes #<I>
|
diff --git a/repository.go b/repository.go
index <HASH>..<HASH> 100644
--- a/repository.go
+++ b/repository.go
@@ -107,7 +107,6 @@ func (r *Repository) Get(ro *RepositoryOptions) (*Repository, error) {
func (r *Repository) ListFiles(ro *RepositoryFilesOptions) ([]RepositoryFile, error) {
filePath := path.Join("/repositories", ro.Owner, ro.RepoSlug, "src", ro.Ref, ro.Path) + "/"
urlStr := r.c.requestUrl(filePath)
- print(urlStr)
response, err := r.c.execute("GET", urlStr, "")
if err != nil {
return nil, err
|
Removed accidental print (#<I>)
|
diff --git a/Controller/SecurityFOSUser1Controller.php b/Controller/SecurityFOSUser1Controller.php
index <HASH>..<HASH> 100644
--- a/Controller/SecurityFOSUser1Controller.php
+++ b/Controller/SecurityFOSUser1Controller.php
@@ -80,11 +80,11 @@ class SecurityFOSUser1Controller extends SecurityController
? Security::LAST_USERNAME : SecurityContextInterface::LAST_USERNAME;
// NEXT_MAJOR: Symfony <2.4 BC. To be removed.
- if ($this->has('security.csrf.token_manager')) {
- $csrfToken = $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue();
+ if ($this->container->has('security.csrf.token_manager')) {
+ $csrfToken = $this->container->get('security.csrf.token_manager')->getToken('authenticate')->getValue();
} else {
- $csrfToken = $this->has('form.csrf_provider')
- ? $this->get('form.csrf_provider')->generateCsrfToken('authenticate')
+ $csrfToken = $this->container->has('form.csrf_provider')
+ ? $this->container->get('form.csrf_provider')->generateCsrfToken('authenticate')
: null;
}
|
Fix non-use of container for has/get services. (#<I>)
|
diff --git a/three/three.py b/three/three.py
index <HASH>..<HASH> 100644
--- a/three/three.py
+++ b/three/three.py
@@ -165,7 +165,11 @@ class Three(object):
url = self._create_path('requests')
self.request = requests.post(url, data=kwargs)
content = self.request.content
- return self.convert(content, True)
+ if self.request.status_code == 200:
+ conversion = True
+ else:
+ conversion = False
+ return self.convert(content, conversion)
def token(self, id, **kwargs):
"""
|
Only try to convert successful POST requests
|
diff --git a/lib/toc.js b/lib/toc.js
index <HASH>..<HASH> 100644
--- a/lib/toc.js
+++ b/lib/toc.js
@@ -43,7 +43,7 @@ module.exports = function (source, options) {
cache[href] = 1;
}
- var tocElem = '* [' + header.text.replace(/\\/g, '\\\\') + '](#' + href + ')' + EOL,
+ var tocElem = '- [' + header.text.replace(/\\/g, '\\\\') + '](#' + href + ')' + EOL,
indent = utils.getIndent(usedHeaders, header.depth);
usedHeaders.unshift({
|
Use 'hyphen' instead of 'asterisk' in the generated TOC
|
diff --git a/src/main/java/co/aurasphere/botmill/fb/model/incoming/callback/Referral.java b/src/main/java/co/aurasphere/botmill/fb/model/incoming/callback/Referral.java
index <HASH>..<HASH> 100644
--- a/src/main/java/co/aurasphere/botmill/fb/model/incoming/callback/Referral.java
+++ b/src/main/java/co/aurasphere/botmill/fb/model/incoming/callback/Referral.java
@@ -65,7 +65,7 @@ public class Referral implements Serializable {
// TODO: https://github.com/BotMill/fb-botmill/issues/19
/**
* The source of this referral. Currently, the only possible value is
- * �SHORTLINK�.
+ * "SHORTLINK".
*/
private String source;
|
Fixed the unicode character that's preventing the CI build
|
diff --git a/js/base/Exchange.js b/js/base/Exchange.js
index <HASH>..<HASH> 100644
--- a/js/base/Exchange.js
+++ b/js/base/Exchange.js
@@ -2244,11 +2244,12 @@ module.exports = class Exchange {
const timeInForceUpper = timeInForce.toUpperCase ();
const typeLower = type.toLowerCase ();
const ioc = timeInForceUpper === 'IOC';
+ const fok = timeInForceUpper === 'FOK';
const timeInForcePostOnly = timeInForceUpper === 'PO';
const isMarket = typeLower === 'market';
postOnly = postOnly || typeLower === 'postonly' || timeInForcePostOnly || exchangeSpecificOption;
if (postOnly) {
- if (ioc) {
+ if (ioc || fok) {
throw new InvalidOrder (this.id + ' postOnly orders cannot have timeInForce equal to ' + timeInForce);
} else if (isMarket) {
throw new InvalidOrder (this.id + ' postOnly orders cannot have type ' + type);
|
fok added to disallowed timeInForce with postOnly
|
diff --git a/app/helpers/xml_helper.rb b/app/helpers/xml_helper.rb
index <HASH>..<HASH> 100644
--- a/app/helpers/xml_helper.rb
+++ b/app/helpers/xml_helper.rb
@@ -1,2 +1,16 @@
module XmlHelper
+ def collection_lastmod(collection)
+ article_updated = collection.articles.find(:first, :order => 'updated_at DESC')
+ article_published = collection.articles.find(:first, :order => 'published_at DESC')
+
+ times = []
+ times.push article_updated.updated_at if article_updated
+ times.push article_published.updated_at if article_published
+
+ if times.empty?
+ Time.at(0).xmlschema
+ else
+ times.max.xmlschema
+ end
+ end
end
diff --git a/spec/controllers/xml_controller_spec.rb b/spec/controllers/xml_controller_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/controllers/xml_controller_spec.rb
+++ b/spec/controllers/xml_controller_spec.rb
@@ -178,6 +178,7 @@ describe XmlController do
# TODO(laird): make this more robust
it "test_sitemap" do
+ Factory(:category)
get :feed, :format => 'googlesitemap', :type => 'sitemap'
assert_response :success
|
Fix google sitemap.
Restores XmlHelper#collection_lastmod, which had been removed in
commit f4eeaaa<I>b4c<I>cfe<I>bea<I>f<I>.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,8 @@
from distutils.core import setup
setup(
name = 'redash_client',
- packages = ['redash_client'],
- version = '0.1.4',
+ packages = ['redash_client', 'redash_client.dashboards'],
+ version = '0.1.5',
description = 'A client for the re:dash API for stmo (https://sql.telemetry.mozilla.org)',
author = 'Marina Samuel',
author_email = 'msamuel@mozilla.com',
|
Pip packaging should include dashboards subdirectory.
|
diff --git a/test/unit/search_query_test.rb b/test/unit/search_query_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/search_query_test.rb
+++ b/test/unit/search_query_test.rb
@@ -10,6 +10,12 @@ module Slingshot::Search
assert_respond_to Query.new, :to_json
end
+ should "allow a block to be given" do
+ assert_equal( { :term => { :foo => 'bar' } }.to_json, Query.new do
+ term(:foo, 'bar')
+ end.to_json)
+ end
+
should "allow search for single term" do
assert_equal( { :term => { :foo => 'bar' } }, Query.new.term(:foo, 'bar') )
end
|
[REFACTORING] Added test for instance_eval in Search::Query#initialize
|
diff --git a/internetarchive/internetarchive.py b/internetarchive/internetarchive.py
index <HASH>..<HASH> 100755
--- a/internetarchive/internetarchive.py
+++ b/internetarchive/internetarchive.py
@@ -60,7 +60,7 @@ class Item(object):
#_____________________________________________________________________________________
def files(self):
"""Generator for iterating over files in an item"""
- for file_dict in self.metadata['files']:
+ for file_dict in self.metadata.get('files', []):
file = File(self, file_dict)
yield file
@@ -277,6 +277,7 @@ class File(object):
#_____________________________________________________________________________________
def __init__(self, item, file_dict):
self.item = item
+ self.external_identifier = file_dict.get('external-identifier')
self.name = file_dict.get('name')
self.source = file_dict.get('source')
self.size = file_dict.get('size')
|
If file-level metadata is not available for an item, return an empty iterator rather than KeyError in item.files(). Added external_identifier attribute to the File class.
|
diff --git a/Lib/fontParts/objects/nonelab/__init__.py b/Lib/fontParts/objects/nonelab/__init__.py
index <HASH>..<HASH> 100644
--- a/Lib/fontParts/objects/nonelab/__init__.py
+++ b/Lib/fontParts/objects/nonelab/__init__.py
@@ -1 +1,17 @@
-from font import RFont
\ No newline at end of file
+from fontParts.objects.base.errors import FontPartsError
+from font import RFont
+from info import RInfo
+from groups import RGroups
+from kerning import RKerning
+from features import RFeatures
+from lib import RLib
+from layer import RLayer
+from glyph import RGlyph
+from contour import RContour
+from point import RPoint
+from segment import RSegment
+from bPoint import RBPoint
+from component import RComponent
+from anchor import RAnchor
+from guideline import RGuideline
+from image import RImage
|
adding imports to top level nonelab
|
diff --git a/src/MetaModels/MetaModel.php b/src/MetaModels/MetaModel.php
index <HASH>..<HASH> 100644
--- a/src/MetaModels/MetaModel.php
+++ b/src/MetaModels/MetaModel.php
@@ -729,10 +729,16 @@ class MetaModel implements IMetaModel
// Build the right key for the cache.
$sortKey = \sprintf('%s-%s', $strSortBy, \strtolower($strSortOrder));
// Used the cached ID list, and make a list of wanted ID's with the sorting of the cache.
- $cacheResult = array_intersect((array) $this->existingIds[$sortKey], $arrFilteredIds);
+ if (!isset($this->existingIds[$sortKey])) {
+ $this->existingIds[$sortKey] = [];
+ }
+ $cacheResult = array_intersect($this->existingIds[$sortKey], $arrFilteredIds);
// Check if we have all ID's or if we have one missing, now we are using the order of the MM Filter.
if (array_intersect($arrFilteredIds, $cacheResult) === $arrFilteredIds) {
- return $cacheResult;
+ if ($intOffset > 0 || $intLimit > 0) {
+ return array_values(array_slice($cacheResult, $intOffset, $intLimit ?: null));
+ }
+ return array_values($cacheResult);
}
// Merge the already known and the new one.
|
Fix slicing bug in MetaModel::getIdsFromFilter
The method `MetaModel::getIdsFromFilter` lost support for offset and
limit when we introduced the id cache. The functionality has been
restored.
|
diff --git a/graylog2-server/src/main/java/org/graylog2/CommandLineArguments.java b/graylog2-server/src/main/java/org/graylog2/CommandLineArguments.java
index <HASH>..<HASH> 100644
--- a/graylog2-server/src/main/java/org/graylog2/CommandLineArguments.java
+++ b/graylog2-server/src/main/java/org/graylog2/CommandLineArguments.java
@@ -42,7 +42,7 @@ public class CommandLineArguments {
private String pluginShortname;
@Parameter(names = {"-v", "--plugin-version"}, description = "Install plugin with this version")
- private String pluginVersion = Core.GRAYLOG2_VERSION;
+ private String pluginVersion = Core.GRAYLOG2_VERSION.toString();
@Parameter(names = {"-m", "--force-plugin"}, description = "Force plugin installation even if this version of graylog2-server is not officially supported.")
private boolean forcePlugin = false;
|
Fixing compilation error related to new Version class
|
diff --git a/spec/aggregator_cfgs_and_properties_spec.rb b/spec/aggregator_cfgs_and_properties_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/aggregator_cfgs_and_properties_spec.rb
+++ b/spec/aggregator_cfgs_and_properties_spec.rb
@@ -333,7 +333,7 @@ describe JsDuck::Aggregator do
/**
* Some documentation.
*/
- Ext.createAlias(class, "foo", "bar");
+ Ext.createAlias(MyClass, "foo", "bar");
EOS
end
it "should fail detecting name of the property" do
|
Remove use of reserved word from cfgs/props spec.
|
diff --git a/src/API.js b/src/API.js
index <HASH>..<HASH> 100644
--- a/src/API.js
+++ b/src/API.js
@@ -149,6 +149,12 @@ export class API extends ol.Object {
)
}
+ setVisibleBaseLayer (id) {
+ this.map_.get('baseLayers').recursiveForEach((layer) => {
+ layer.setVisible(layer.get('id') === id)
+ })
+ }
+
onKeyDown_ (e) {
if (this.featureManipulationActive_ && e.which === keyCodes.ESCAPE) {
this.endFeatureManipulationInternal_()
|
added setVisibleBaseLayer to API (selected by id)
|
diff --git a/activerecord/lib/active_record/test_case.rb b/activerecord/lib/active_record/test_case.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/test_case.rb
+++ b/activerecord/lib/active_record/test_case.rb
@@ -1,3 +1,7 @@
+require 'active_support/deprecation'
+require 'active_support/test_case'
+
+ActiveSupport::Deprecation.warn('ActiveRecord::TestCase is deprecated, please use ActiveSupport::TestCase')
module ActiveRecord
# = Active Record Test Case
#
|
deprecated AR::TestCase in favor of AS::TestCase
|
diff --git a/core/src/main/java/tachyon/client/TachyonFS.java b/core/src/main/java/tachyon/client/TachyonFS.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/tachyon/client/TachyonFS.java
+++ b/core/src/main/java/tachyon/client/TachyonFS.java
@@ -11,6 +11,7 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
+import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -200,13 +201,14 @@ public class TachyonFS extends AbstractTachyonFS {
/**
* Create a user local temporary folder and return it
*
- * @return the local temporary folder for the user
+ * @return the local temporary folder for the user or null if unable to allocate one.
* @throws IOException
*/
synchronized File createAndGetUserLocalTempFolder() throws IOException {
String userTempFolder = mWorkerClient.getUserTempFolder();
- if (userTempFolder == null) {
+ if (StringUtils.isBlank(userTempFolder)) {
+ LOG.error("Unable to get local temporary folder location for user.");
return null;
}
|
Add check for empty String for the local directory in addition to null.
Add logging to detect why return null.
|
diff --git a/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/ContaoBackendViewTemplate.php b/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/ContaoBackendViewTemplate.php
index <HASH>..<HASH> 100644
--- a/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/ContaoBackendViewTemplate.php
+++ b/src/ContaoCommunityAlliance/DcGeneral/Contao/View/Contao2BackendView/ContaoBackendViewTemplate.php
@@ -141,4 +141,30 @@ class ContaoBackendViewTemplate extends BackendTemplate implements ViewTemplateI
$renderer = new GlobalButtonRenderer($environment);
return $renderer->render();
}
+
+ // @codingStandardsIgnoreStart
+ /**
+ * {@inheritDoc}
+ */
+ public function getData()
+ {
+ return parent::getData();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function parse()
+ {
+ return parent::parse();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function output()
+ {
+ parent::output();
+ }
+ // @codingStandardsIgnoreEnd
}
|
Revert some methods in the ContaoBackendViewTemplate and ignore from coding standard. It was broken by phpunit tests
|
diff --git a/processing/src/main/java/io/druid/segment/data/CompressedObjectStrategy.java b/processing/src/main/java/io/druid/segment/data/CompressedObjectStrategy.java
index <HASH>..<HASH> 100644
--- a/processing/src/main/java/io/druid/segment/data/CompressedObjectStrategy.java
+++ b/processing/src/main/java/io/druid/segment/data/CompressedObjectStrategy.java
@@ -270,7 +270,6 @@ public class CompressedObjectStrategy<T extends Buffer> implements ObjectStrateg
public static class LZ4Compressor implements Compressor
{
private static final LZ4Compressor defaultCompressor = new LZ4Compressor();
- private static final net.jpountz.lz4.LZ4Compressor lz4Fast = LZ4Factory.fastestInstance().fastCompressor();
private static final net.jpountz.lz4.LZ4Compressor lz4High = LZ4Factory.fastestInstance().highCompressor();
@Override
|
Removed lz4Fast from CompressedObjectStrategy for compression since it is not currently used
|
diff --git a/src/apb/engine.py b/src/apb/engine.py
index <HASH>..<HASH> 100644
--- a/src/apb/engine.py
+++ b/src/apb/engine.py
@@ -382,6 +382,7 @@ def get_registry_service_ip(namespace, svc_name):
def get_asb_route():
asb_route = None
route_list = None
+ suffix = None
possible_namespaces = ["ansible-service-broker", "openshift-ansible-service-broker",
"openshift-automation-service-broker"]
for namespace in possible_namespaces:
@@ -390,6 +391,7 @@ def get_asb_route():
oapi = openshift_client.OapiApi()
route_list = oapi.list_namespaced_route(namespace)
if route_list.items != []:
+ suffix = namespace
break
except ApiException as e:
print("Didn't find OpenShift Automation Broker route in namespace: %s.\
@@ -406,8 +408,10 @@ def get_asb_route():
if asb_route is None:
print("Error finding a route to the OpenShift Automation Broker.")
return None
+ if suffix is None:
+ suffix = "openshift-automation-service-broker"
- url = asb_route + "/openshift-automation-service-broker"
+ url = asb_route + "/" + suffix
if url.find("http") < 0:
url = "https://" + url
|
Fix suffix so that its not hardcoded (#<I>)
* Fix suffix so that its not hardoded
* Fix typo
|
diff --git a/gruntfile.js b/gruntfile.js
index <HASH>..<HASH> 100644
--- a/gruntfile.js
+++ b/gruntfile.js
@@ -329,7 +329,7 @@ module.exports = function(grunt) {
buildOLDebug: '(node <%= olDir %>/tasks/build.js <%= olDir %>/config/ol-debug.json app/assets/libs/ol-debug.js)',
buildOL: '(node <%= olDir %>/tasks/build.js <%= olDir %>/config/ol.json app/assets/libs/ol.js)',
initOL: '(cd <%= olDir %> && make install)',
- buildTypeScript: 'tsc'
+ buildTypeScript: '/node_modules/typescript/bin/tsc'
},
/*
@@ -524,7 +524,7 @@ module.exports = function(grunt) {
'clean:build',
'clean:tmp',
'less',
- // 'typescript',
+ 'exec:buildTypeScript',
'includeSource',
'configureProxies:server',
'connect',
|
Build typescript on grunt execution
|
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/json/parser.js b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/json/parser.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/languages/json/parser.js
+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/languages/json/parser.js
@@ -665,8 +665,8 @@
}
}
},
- onError: function (error) {
- errors.push({ error: error });
+ onError: function (error, offset, lngth) {
+ errors.push({ error: error, offset: offset, length: lngth });
}
};
visit(text, visitor, options);
|
Bug <I> - [json] The JSON parser should return location information when an error is encountered
|
diff --git a/netsnmptestenv.py b/netsnmptestenv.py
index <HASH>..<HASH> 100644
--- a/netsnmptestenv.py
+++ b/netsnmptestenv.py
@@ -59,19 +59,23 @@ class netsnmpTestEnv(object):
def shutdown(self):
def kill_process(pid):
- # First we ask it nicely to quit. If after a second it hasn't, we
- # will kill it the hard way.
- try:
- starttime = time.clock()
- os.kill(pid, signal.SIGTERM)
- while time.clock() == starttime:
- os.kill(pid, 0)
- os.kill(pid, signal.SIGKILL)
- starttime = time.clock()
- while True:
- os.kill(pid, 0)
- except OSError as e:
- pass
+ def is_running(pid):
+ return os.path.exists("/proc/{0}".format(pid))
+
+ if not is_running(pid):
+ return
+
+ starttime = time.clock()
+ os.kill(pid, signal.SIGTERM)
+ while time.clock() == starttime:
+ time.sleep(0.25)
+
+ if not is_running(pid):
+ return
+
+ os.kill(pid, signal.SIGTERM)
+ while is_running(pid):
+ time.sleep(0.25)
# Check for existance of snmpd's PID file
if os.access(self.pidfile, os.R_OK):
|
Use slightly more intelligent process killing in netsnmptestenv module
Instead of hammering the process to be killed with signals continously,
sleep small amounts of time and check procfs. This is obviously
Linux-specific, but so far I have not heard of anyone trying to use
python-netsnmpagent with net-snmp on different platforms.
|
diff --git a/km3pipe/db.py b/km3pipe/db.py
index <HASH>..<HASH> 100644
--- a/km3pipe/db.py
+++ b/km3pipe/db.py
@@ -145,6 +145,17 @@ class DBManager(object):
else:
return dataframe
+ def t0sets(self, det_id):
+ content = self._get_content('streamds/t0sets.txt?detid={0}'
+ .format(det_id))
+ try:
+ dataframe = pd.read_csv(StringIO(content), sep="\t")
+ except ValueError:
+ log.warning("Empty dataset")
+ return pd.DataFrame()
+ else:
+ return dataframe
+
@property
def parameters(self):
"Return the parameters container for quick access to their details"
|
Implements t0sets retrieval
|
diff --git a/vel/rl/env/wrappers/clip_episode_length.py b/vel/rl/env/wrappers/clip_episode_length.py
index <HASH>..<HASH> 100644
--- a/vel/rl/env/wrappers/clip_episode_length.py
+++ b/vel/rl/env/wrappers/clip_episode_length.py
@@ -19,6 +19,7 @@ class ClipEpisodeEnv(gym.Wrapper):
if self.current_episode_length > self.max_episode_length:
done = True
+ info['clipped_length'] = True
return ob, reward, done, info
|
Additional information from the clipped env length wrapper.
|
diff --git a/src/frontend/org/voltdb/iv2/DuplicateCounter.java b/src/frontend/org/voltdb/iv2/DuplicateCounter.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/iv2/DuplicateCounter.java
+++ b/src/frontend/org/voltdb/iv2/DuplicateCounter.java
@@ -116,12 +116,9 @@ public class DuplicateCounter
ClientResponseImpl r = message.getClientResponseData();
// get the hash of sql run
long hash = 0;
- // A mispartitioned transaction has no response in the message
- if (r != null) {
- Integer sqlHash = r.getHash();
- if (sqlHash != null) {
- hash = sqlHash.intValue();
- }
+ Integer sqlHash = r.getHash();
+ if (sqlHash != null) {
+ hash = sqlHash.intValue();
}
return checkCommon(hash, message.isRecovering(), message);
}
|
Remove redundant DuplicateCounter code that expects some old behavior.
|
diff --git a/nodeshot/scripts/snmp.py b/nodeshot/scripts/snmp.py
index <HASH>..<HASH> 100755
--- a/nodeshot/scripts/snmp.py
+++ b/nodeshot/scripts/snmp.py
@@ -75,7 +75,6 @@ def get_signal(ip):
oid_dbm = 1,3,6,1,4,1,14988,1,1,1,2,1,3
#get connected mac and their dbm
res = cmdgen.CommandGenerator().nextCmd(community, transport, oid_dbm)
- print res
ret = []
try:
for i in res[3]:
|
minimal cleanup in snmp.py
|
diff --git a/global-fs/src/main/java/io/global/fs/http/GlobalFsDriverServlet.java b/global-fs/src/main/java/io/global/fs/http/GlobalFsDriverServlet.java
index <HASH>..<HASH> 100644
--- a/global-fs/src/main/java/io/global/fs/http/GlobalFsDriverServlet.java
+++ b/global-fs/src/main/java/io/global/fs/http/GlobalFsDriverServlet.java
@@ -58,7 +58,7 @@ public final class GlobalFsDriverServlet {
try {
PubKey space = PubKey.fromString(request.getPathParameter("space"));
SimKey simKey = getSimKey(request);
- String name = request.getRelativePath();
+ String name = UrlParser.urlDecode(request.getRelativePath());
return driver.getMetadata(space, name)
.then(meta -> {
if (meta != null) {
|
Fix global-fs not urldecoding download file names
|
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/search/InlineSearchPane.js b/bundles/org.eclipse.orion.client.ui/web/orion/search/InlineSearchPane.js
index <HASH>..<HASH> 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/search/InlineSearchPane.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/search/InlineSearchPane.js
@@ -743,6 +743,12 @@ define([
scopeString = this._fileClient.fileServiceName(scopeString);
} else {
scopeString = scopeString.replace(rootName, "");
+ if(scopeString === "/workspace/orionode"){
+ scopeString = messages["Scope All"];
+ }else{
+ // Remove the workspace name portion from the scopeString, which will remove 'orionode' from '/orionode/Foldername'
+ scopeString = "/" + scopeString.split("/").slice(2).join("/");
+ }
}
var locationElementWrapper = document.createElement("div");
locationElementWrapper.classList.add("locationElementWrapper");
|
Bug <I> - Search's "Find in" field should not show the workspace name
|
diff --git a/mod/forum/discuss.php b/mod/forum/discuss.php
index <HASH>..<HASH> 100644
--- a/mod/forum/discuss.php
+++ b/mod/forum/discuss.php
@@ -64,6 +64,16 @@
add_to_log($course->id, "forum", "move discussion", "discuss.php?d=$discussion->id", "$discussion->id");
}
$discussionmoved = true;
+ require_once('rsslib.php');
+ require_once($CFG->libdir.'/rsslib.php');
+
+ // Delete the RSS files for the 2 forums because we want to force
+ // the regeneration of the feeds since the discussions have been
+ // moved.
+ if (!forum_rss_delete_file($forum) || !forum_rss_delete_file($fromforum)) {
+ notify('Could not purge the cached RSS feeds for the source and/or'.
+ 'destination forum(s) - check your file permissionsforums');
+ }
} else {
error("You can't move to that forum - it doesn't exist!");
}
|
re-merge of "Merged fix from <I> for Bug #<I> - RSS Feeds and Moving Discussions."
Originally by vyshane - got dropped accidentally in one of the biiiiig roles
commits.
|
diff --git a/hvac/adapters.py b/hvac/adapters.py
index <HASH>..<HASH> 100644
--- a/hvac/adapters.py
+++ b/hvac/adapters.py
@@ -288,7 +288,7 @@ class RawAdapter(Adapter):
_kwargs.update(kwargs)
if self.strict_http and method.lower() in ('list',):
- # Encty point for standard HTTP substitution
+ # Entry point for standard HTTP substitution
params = _kwargs.get('params', {})
if method.lower() == 'list':
method = 'get'
|
Encty -> Entry typo fix
|
diff --git a/lib/objectcache.rb b/lib/objectcache.rb
index <HASH>..<HASH> 100644
--- a/lib/objectcache.rb
+++ b/lib/objectcache.rb
@@ -39,6 +39,10 @@ module Ronin
@store = Og.setup(:destroy => false, :evolve_schema => :full, :store => :sqlite, :name => @path)
end
+ def sql(*sql)
+ @store.get_store.exec_statement(sql.join('; '))
+ end
+
protected
def method_missing(sym,*args)
|
* Just in case anyone ever needs to, they can execute pure SQL.
|
diff --git a/src/main/java/org/fest/assertions/api/AbstractAssert.java b/src/main/java/org/fest/assertions/api/AbstractAssert.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/fest/assertions/api/AbstractAssert.java
+++ b/src/main/java/org/fest/assertions/api/AbstractAssert.java
@@ -36,6 +36,7 @@ public abstract class AbstractAssert<S, A> implements Assert<S, A> {
@VisibleForTesting Conditions conditions = Conditions.instance();
@VisibleForTesting final WritableAssertionInfo info;
+ // visibility is protected to allow use write custom assertions that need to access actual
@VisibleForTesting protected final A actual;
protected final S myself;
|
Add comment to explain wht actual visbility has been set to protected (to allow custom assertion to access actual)
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ setup(
author='Nicholas H.Tollervey',
author_email='ntoll@ntoll.org',
url='https://github.com/ntoll/uflash',
- py_modules=['uflash', 'hexify'],
+ py_modules=['uflash', 'py2hex'],
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
@@ -36,6 +36,6 @@ setup(
'Topic :: Software Development :: Embedded Systems',
],
entry_points={
- 'console_scripts': ['uflash=uflash:main', 'hexify=hexify:main'],
+ 'console_scripts': ['uflash=uflash:main', 'py2hex=uflash:py2hex'],
}
)
|
Updates to reflect hexify -> py2hex changes
Changed command name from hexify to py2hex
Changed entry point for py2hex
|
diff --git a/Str.php b/Str.php
index <HASH>..<HASH> 100644
--- a/Str.php
+++ b/Str.php
@@ -185,14 +185,21 @@ class Str
}
/**
- * Trims the given string and replaces multiple consecutive whitespaces with a single space.
+ * Trims the given string and replaces multiple consecutive whitespaces with a single whitespace.
*
- * @param string $str The string to clean.
- * @return string The resulting string.
+ * Note: This includes multi-byte whitespace characters, tabs and newlines, which effectively means
+ * that the string may also be collapsed down. This is mostly a utility for processing natural language
+ * user input for displaying.
+ *
+ * @param string $str The string to collapse.
+ * @param string|null $encoding The encoding to use.
+ * @return string The resulting string.
*/
- public static function clean(string $str) : string
+ public static function collapse(string $str, string $encoding = null) : string
{
- return preg_replace('/\s+/u', ' ', trim($str));
+ $encoding = $encoding ?: static::encoding($str);
+
+ return static::trim(static::replace($str, '[[:space:]]+', ' ', 'msr', $encoding), null, $encoding);
}
/**
|
[Utils/Str] Renamed Str::clean() -> Str::collapse() to narrow down its intent. Redirects to Str::trim() and Str::replace(), ie. uses mb_ereg_replace() now internally and properly handles encoding the way the rest of the Str utility does.
|
diff --git a/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java b/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java
index <HASH>..<HASH> 100644
--- a/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java
+++ b/testsrc/org/mozilla/javascript/tests/Test262SuiteTest.java
@@ -195,13 +195,15 @@ public class Test262SuiteTest {
}
String str = testCase.source;
+ int line = 1;
if (useStrict) {
str = "\"use strict\";\n" + str;
+ line--;
}
boolean failedEarly = true;
try {
- Script caseScript = cx.compileString(str, testFilePath, 0, null);
+ Script caseScript = cx.compileString(str, testFilePath, line, null);
failedEarly = false; // not after this line
caseScript.exec(cx, scope);
|
Print original line number of file in test<I>.
|
diff --git a/lib/generators/wanko/templates/lib/%name%/engine.rb b/lib/generators/wanko/templates/lib/%name%/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/generators/wanko/templates/lib/%name%/engine.rb
+++ b/lib/generators/wanko/templates/lib/%name%/engine.rb
@@ -4,6 +4,6 @@ module <%= camelized %>
class Engine < ::Rails::Engine
include Wanko::Engine
- active_if { false }
+ active_if { true }
end
end
|
Let newly created extensions be enabled by default
|
diff --git a/src/pandas_profiling/utils/progress_bar.py b/src/pandas_profiling/utils/progress_bar.py
index <HASH>..<HASH> 100644
--- a/src/pandas_profiling/utils/progress_bar.py
+++ b/src/pandas_profiling/utils/progress_bar.py
@@ -1,6 +1,5 @@
-from collections import Callable
from functools import wraps
-from typing import Any
+from typing import Any, Callable
from tqdm import tqdm
|
refactor: typing progress_bar.py
|
diff --git a/semantic_release/cli.py b/semantic_release/cli.py
index <HASH>..<HASH> 100644
--- a/semantic_release/cli.py
+++ b/semantic_release/cli.py
@@ -161,7 +161,8 @@ def changelog(*, unreleased=False, noop=False, post=False, **kwargs):
log = generate_changelog(current_version, None)
else:
log = generate_changelog(previous_version, current_version)
- logger.info(markdown_changelog(current_version, log, header=False))
+ # print is used to keep the changelog on stdout, separate from log messages
+ print(markdown_changelog(current_version, log, header=False))
# Post changelog to HVCS if enabled
if not noop and post:
|
fix(changelog): send changelog to stdout
Fixes #<I>
|
diff --git a/Facades/Notification.php b/Facades/Notification.php
index <HASH>..<HASH> 100644
--- a/Facades/Notification.php
+++ b/Facades/Notification.php
@@ -13,7 +13,9 @@ use Illuminate\Support\Testing\Fakes\NotificationFake;
* @method static mixed channel(string|null $name = null)
* @method static void assertNotSentTo(mixed $notifiable, string|\Closure $notification, callable $callback = null)
* @method static void assertNothingSent()
+ * @method static void assertSentOnDemand(string|\Closure $notification, callable $callback = null)
* @method static void assertSentTo(mixed $notifiable, string|\Closure $notification, callable $callback = null)
+ * @method static void assertSentOnDemandTimes(string $notification, int $times = 1)
* @method static void assertSentToTimes(mixed $notifiable, string $notification, int $times = 1)
* @method static void assertTimesSent(int $expectedCount, string $notification)
* @method static void send(\Illuminate\Support\Collection|array|mixed $notifiables, $notification)
|
Add missing methods to Notification facade (#<I>)
|
diff --git a/lib/Models/registerCatalogMembers.js b/lib/Models/registerCatalogMembers.js
index <HASH>..<HASH> 100644
--- a/lib/Models/registerCatalogMembers.js
+++ b/lib/Models/registerCatalogMembers.js
@@ -21,7 +21,6 @@ var createCatalogMemberFromType = require('./createCatalogMemberFromType');
var CsvCatalogItem = require('./CsvCatalogItem');
var CswCatalogGroup = require('./CswCatalogGroup');
var CzmlCatalogItem = require('./CzmlCatalogItem');
-var deprecationWarning = require('terriajs-cesium/Source/Core/deprecationWarning');
var GeoJsonCatalogItem = require('./GeoJsonCatalogItem');
var GpxCatalogItem = require('./GpxCatalogItem');
var KmlCatalogItem = require('./KmlCatalogItem');
|
Fix eslint warning.
|
diff --git a/src/Escaper.php b/src/Escaper.php
index <HASH>..<HASH> 100644
--- a/src/Escaper.php
+++ b/src/Escaper.php
@@ -43,7 +43,7 @@ class Escaper
*/
public function escapeCharacterClass(string $char): string
{
- return (isset($this->inCharacterClass[$char])) ? $this->inCharacterClass[$char] : $char;
+ return $this->inCharacterClass[$char] ?? $char;
}
/**
@@ -54,6 +54,6 @@ class Escaper
*/
public function escapeLiteral(string $char): string
{
- return (isset($this->inLiteral[$char])) ? $this->inLiteral[$char] : $char;
+ return $this->inLiteral[$char] ?? $char;
}
}
\ No newline at end of file
diff --git a/src/Output/PrintableAscii.php b/src/Output/PrintableAscii.php
index <HASH>..<HASH> 100644
--- a/src/Output/PrintableAscii.php
+++ b/src/Output/PrintableAscii.php
@@ -43,7 +43,7 @@ abstract class PrintableAscii extends BaseImplementation
{
$table = [9 => '\\t', 10 => '\\n', 13 => '\\r'];
- return (isset($table[$cp])) ? $table[$cp] : $this->escapeAscii($cp);
+ return $table[$cp] ?? $this->escapeAscii($cp);
}
/**
|
Replaced ternaries with null coalescing operator
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.