Compare commits

...
10 Commits
Author SHA1 Message Date
Gina Häußge 229f3a2744 Preparing release of 1.3.0rc3 2016-12-02 12:39:28 +01:00
Gina Häußge c00b3de40c Fix temperature history on server reconnect
Two problems solved:

  * Make sure to only process temperature data once we
    have printer profile information on hand to evaluate
    the heater data. If we don't have that yet, create a client
    side backlog and process that once we have the necessary
    data on hand.
  * Do not use uninitialized history cutoff values - if our cutoff
    value hasn't yet synced (no settings response arrived yet),
    just don't perform the cutoff.
2016-12-02 11:06:01 +01:00
Gina Häußge 3d3c93c67d Fix yet another settings caching issue
That api endpoint really is a tough nut. ETag calculation now also
takes full settings dump from settings plugins into account, because
those might be providing custom keys through custom on_settings_load
implementations, for which we will not notice any changes if we are
only looking at the effective config.

Of course, the more we put into that ETag calculation, the slower it will
be and the less sense it will make. Somewhat annoying :/
2016-12-01 13:47:41 +01:00
Gina Häußge 1e84f2ee6e Fix handling of new structures in getOnlyChangedData
Not testing if oldRoot was actually set and contained the
key in question could cause issues if a completely new data
structure was sent to the backend that was not mirrored by
the default settings. Things like e.g. complex configuration
items in a by default empty object.
2016-12-01 13:46:20 +01:00
Gina Häußge 4541148aa5 Merge branch 'maintenance' into devel
# Conflicts:
#	CHANGELOG.md
2016-11-30 14:34:21 +01:00
Gina Häußge e8a4750379 Improved (manually to run) doc test for latest release selector 2016-11-30 14:33:36 +01:00
Gina Häußge 1d0657a8eb Preparing release of 1.2.18 2016-11-30 11:24:50 +01:00
Gina Häußge 65377b396f Added note that jquery and lodash are dependencies of the js client lib 2016-11-28 11:29:17 +01:00
Gina Häußge a66e6b603f Make sure our command line calls always exit
sarge's "wait_events" is unreliable. If an asynchronous
job is started but stops immediately and raises a sarge
Exception (inside the async thread), the associated
command's event will never be set event though the
process finished. So we'd wait indefinitely here.

We circumvent this by first waiting until the commands
are parsed and processed (p.commands contains
elements), then until said commands are started and then
making sure the command's process is actually set. Only
then do we actually have a background process running
that we'll be able to monitor further down, otherwise
the command immediately failed.
2016-11-25 15:45:43 +01:00
Gina Häußge 528e99898f Better error and subprocess handling
Removed a potential deadlock, added logging for all
raised exceptions, made _to_error more solid and
removed another potential encoding issue when
creating diffs
2016-11-25 14:58:09 +01:00
14 changed files with 274 additions and 110 deletions

No files matched your search

+23 -2
View File
@@ -1,5 +1,22 @@
# OctoPrint Changelog
## 1.3.0rc3 (2016-12-02)
### Improvements
* Added note to JS client docs that it depends on JQuery and Lodash.
* Improved a (manual) doctest
### Bug fixes
* [#1599](https://github.com/foosel/OctoPrint/issues/1599) - Properly handle exceptions that arise within the update script during runtime.
* Fix a rare race condition in the command line helper and the update script that could cause the code to hang due to waiting on an event that would never be set.
* Fix issue with handling new settings substructures when they are compared to existing settings data in order to find the structural diff.
* Fix for `/api/settings` not being properly invalidated for plugin settings that do not have a representation in `config.yaml` but are only added at runtime (and hence are not captured by `config.effective`).
* Fix for the temperature graph not displaying the data history on site reload.
([Commits](https://github.com/foosel/OctoPrint/compare/1.3.0rc2...1.3.0rc3))
## 1.3.0rc2 (2016-11-24)
### Features
@@ -163,7 +180,7 @@
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.16...1.3.0rc1))
## 1.2.18rc1 (2016-11-22)
## 1.2.18 (2016-11-30)
### Improvements
@@ -179,7 +196,11 @@
* [#1571](https://github.com/foosel/OctoPrint/issues/1571) - Fix parsing of port number from HTTP Host header for IPv6 addresses
* Fix issue with settings restriction causing internal settings defaults to be changed.
([Commits](https://github.com/foosel/OctoPrint/compare/1.2.17...1.2.18))
### More information
* [Commits](https://github.com/foosel/OctoPrint/compare/1.2.17...1.2.18)
* Release Candidates:
* [1.2.18rc1](https://github.com/foosel/OctoPrint/releases/tag/1.2.18rc1)
## 1.2.17 (2016-11-08)
+11 -2
View File
@@ -5,7 +5,8 @@ JavaScript Client Library
#########################
The JS Client Library provides an interface to all of OctoPrint's API, including the SockJS based socket to send
push messages from the server to connected clients. It is available as packed web asset file at ``/static/webassets/packed_client.js`` or as individual
push messages from the server to connected clients. It is available as packed web
asset file at ``/static/webassets/packed_client.js`` or as individual
component files at ``/static/js/app/client/<component>.js`` relative to your
OctoPrint instance's base URL (e.g. ``http://octopi.local/static/webassets/packed_client.js``).
@@ -27,10 +28,18 @@ correct URL prefix:
<script type="text/javascript" src="{{ url_for("static", filename="webassets/packed_client.js") }}"></script>
<!--
individual components
individual components (do not forget base!)
-->
<script type="text/javascript" src="{{ url_for("static", filename="js/app/client/<component>.js") }}"></script>
Regardless of which way you use to include the library, you'll also need to make sure you included JQuery and lodash,
because the library depends on those to be available (as ``$`` and ``_``). You can embed those like this:
.. code-block:: html
<script src="{{ url_for("static", filename="js/lib/jquery/jquery.min.js") }}"></script>
<script src="{{ url_for("static", filename="js/lib/lodash.min.js") }}"></script>
Note that all components depend on the ``base`` component to be present, so if you are only including a select
number of components, make sure to at the very least include that one to be able to utilize the client.
@@ -8,6 +8,8 @@ __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms
import errno
import sys
import traceback
import time
def _log_call(*lines):
_log(lines, prefix=">", stream="call")
@@ -61,39 +63,54 @@ def _execute(command, **kwargs):
try:
p = sarge.run(command, **kwargs)
p.wait_events()
except Exception as e:
import traceback
exception_lines = traceback.format_exc()
error = "Error while trying to run command {}: {}\n{}".format(joined_command, str(e), exception_lines)
return None, "", error
while len(p.commands) == 0:
# somewhat ugly... we can't use wait_events because
# the events might not be all set if an exception
# by sarge is triggered within the async process
# thread
time.sleep(0.01)
# by now we should have a command, let's wait for its
# process to have been prepared
p.commands[0].process_ready.wait()
if not p.commands[0].process:
# the process might have been set to None in case of any exception
print("Error while trying to run command {}".format(joined_command), file=sys.stderr)
return None, [], []
except:
print("Error while trying to run command {}".format(joined_command), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
all_stdout = []
all_stderr = []
try:
while p.returncode is None:
while p.commands[0].poll() is None:
lines = p.stderr.readlines(timeout=0.5)
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stderr(*lines)
all_stderr += list(lines)
lines = p.stdout.readlines(timeout=0.5)
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stdout(*lines)
all_stdout += list(lines)
p.commands[0].poll()
finally:
p.close()
lines = p.stderr.readlines()
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stderr(*lines)
all_stderr += lines
lines = p.stdout.readlines()
if lines:
lines = map(lambda x: _to_unicode(x, errors="replace"), lines)
_log_stdout(*lines)
all_stdout += lines
@@ -107,27 +124,31 @@ def _get_git_executables():
return GITS
def _git(args, cwd, verbose=False, git_executable=None):
def _git(args, cwd, git_executable=None):
if git_executable is not None:
commands = [git_executable]
else:
commands = _get_git_executables()
for c in commands:
command = [c] + args
try:
return _execute([c] + args, cwd=cwd)
return _execute(command, cwd=cwd)
except EnvironmentError:
e = sys.exc_info()[1]
if e.errno == errno.ENOENT:
continue
if verbose:
print("unable to run %s" % args[0])
print(e)
return None, None, None
print("Error while trying to run command {}".format(" ".join(command)), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
except:
print("Error while trying to run command {}".format(" ".join(command)), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
else:
if verbose:
print("unable to find command, tried %s" % (commands,))
return None, None, None
print("Unable to find git command, tried {}".format(", ".join(commands)), file=sys.stderr)
return None, [], []
def _python(args, cwd, python_executable, sudo=False):
@@ -137,31 +158,40 @@ def _python(args, cwd, python_executable, sudo=False):
try:
return _execute(command, cwd=cwd)
except:
return None, None, None
import traceback
print("Error while trying to run command {}".format(" ".join(command)), file=sys.stderr)
traceback.print_exc(file=sys.stderr)
return None, [], []
def _to_error(*lines):
return u"".join(map(lambda x: _to_unicode(x, errors="replace"), lines))
if len(lines) == 1:
if isinstance(lines[0], (list, tuple)):
lines = lines[0]
elif not isinstance(lines[0], (str, unicode)):
lines = [repr(lines[0]),]
return u"\n".join(map(lambda x: _to_unicode(x, errors="replace"), lines))
def _rescue_changes(git_executable, folder):
print(">>> Running: git diff --shortstat")
returncode, stdout, stderr = _git(["diff", "--shortstat"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git diff\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if stdout and "".join(stdout).strip():
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git diff\" failed with returncode {}".format(returncode))
if stdout and u"".join(stdout).strip():
# we got changes in the working tree, maybe from the user, so we'll now rescue those into a patch
import time
import os
timestamp = time.strftime("%Y%m%d%H%M")
patch = os.path.join(folder, "%s-preupdate.patch" % timestamp)
patch = os.path.join(folder, "{}-preupdate.patch".format(timestamp))
print(">>> Running: git diff and saving output to %s" % timestamp)
print(">>> Running: git diff and saving output to {}".format(patch))
returncode, stdout, stderr = _git(["diff"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, installation directory was dirty and state could not be persisted as a patch to %s" % patch)
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, installation directory was dirty and state could not be persisted as a patch to {}".format(patch))
with open(patch, "wb") as f:
import codecs
with codecs.open(patch, "w", encoding="utf-8", errors="replace") as f:
for line in stdout:
f.write(line)
@@ -174,46 +204,45 @@ def update_source(git_executable, folder, target, force=False, branch=None):
if _rescue_changes(git_executable, folder):
print(">>> Running: git reset --hard")
returncode, stdout, stderr = _git(["reset", "--hard"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git reset --hard\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git reset --hard\" failed with returncode {}".format(returncode))
print(">>> Running: git clean -f -d -e *-preupdate.patch")
returncode, stdout, stderr = _git(["clean", "-f", "-d", "-e", "*-preupdate.patch"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git clean -f\" failed with returcode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git clean -f\" failed with returncode {}".format(returncode))
print(">>> Running: git fetch")
returncode, stdout, stderr = _git(["fetch"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git fetch\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
print(stdout)
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git fetch\" failed with returncode {}".format(returncode))
if branch is not None and branch.strip() != "":
print(">>> Running: git checkout {}".format(branch))
returncode, stdout, stderr = _git(["checkout", branch], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git checkout\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git checkout\" failed with returncode {}".format(returncode))
print(">>> Running: git pull")
returncode, stdout, stderr = _git(["pull"], folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Could not update, \"git pull\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"git pull\" failed with returncode {}".format(returncode))
if force:
reset_command = ["reset", "--hard"]
reset_command += [target]
print(">>> Running: git %s" % " ".join(reset_command))
print(">>> Running: git {}".format(" ".join(reset_command)))
returncode, stdout, stderr = _git(reset_command, folder, git_executable=git_executable)
if returncode != 0:
raise RuntimeError("Error while updating, \"git %s\" failed with returncode %d: %s" % (" ".join(reset_command), returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Error while updating, \"git {}\" failed with returncode {}".format(" ".join(reset_command), returncode))
def install_source(python_executable, folder, user=False, sudo=False):
print(">>> Running: python setup.py clean")
returncode, stdout, stderr = _python(["setup.py", "clean"], folder, python_executable)
if returncode != 0:
print("\"python setup.py clean\" failed with returncode %d: %s" % (returncode, stdout))
if returncode is None or returncode != 0:
print("\"python setup.py clean\" failed with returncode {}".format(returncode))
print("Continuing anyways")
print(">>> Running: python setup.py install")
@@ -221,15 +250,14 @@ def install_source(python_executable, folder, user=False, sudo=False):
if user:
args.append("--user")
returncode, stdout, stderr = _python(args, folder, python_executable, sudo=sudo)
if returncode != 0:
raise RuntimeError("Could not update, \"python setup.py install\" failed with returncode %d: %s" % (returncode, _to_error(*stdout)))
if returncode is None or returncode != 0:
raise RuntimeError("Could not update, \"python setup.py install\" failed with returncode {}".format(returncode))
def parse_arguments():
import argparse
boolean_trues = ["true", "yes", "1"]
boolean_falses = ["false", "no", "0"]
parser = argparse.ArgumentParser(prog="update-octoprint.py")
@@ -28,6 +28,7 @@ def _filter_out_latest(releases,
>>> release_1_2_16rc2 = dict(name="1.2.16rc2", tag_name="1.2.16rc2", html_url="some_url", published_at="2016-08-30T12:00:00Z", prerelease=True, draft=False, target_commitish="rc/maintenance")
>>> release_1_2_17rc1 = dict(name="1.2.17rc1", tag_name="1.2.17rc1", html_url="some_url", published_at="2016-08-31T12:00:00Z", prerelease=True, draft=True, target_commitish="rc/maintenance")
>>> release_1_3_0rc1 = dict(name="1.3.0rc1", tag_name="1.3.0rc1", html_url="some_url", published_at="2016-12-12T12:00:00Z", prerelease=True, draft=False, target_commitish="rc/devel")
>>> release_1_2_18 = dict(name="1.2.18", tag_name="1.2.18", html_url="some_url", published_at="2016-12-13T12:00:00Z", prerelease=False, draft=False, target_commitish="master")
>>> release_1_4_0rc1 = dict(name="1.4.0rc1", tag_name="1.4.0rc1", html_url="some_url", published_at="2017-12-12T12:00:00Z", prerelease=True, draft=False, target_commitish="rc/future")
>>> releases = [release_1_2_15, release_1_2_16rc1, release_1_2_16rc2, release_1_2_17rc1, release_1_3_0rc1, release_1_4_0rc1]
>>> _filter_out_latest(releases, include_prerelease=False, prerelease_channel=None)
@@ -44,6 +45,14 @@ def _filter_out_latest(releases,
(None, None, None)
>>> _filter_out_latest([release_1_2_16rc1, release_1_2_16rc2])
(None, None, None)
>>> comparable_factory = _get_comparable_factory("python", force_base=True)
>>> sort_key = lambda release: comparable_factory(_get_sanitized_version(release["tag_name"]))
>>> _filter_out_latest(releases + [release_1_2_18], include_prerelease=False, prerelease_channel=None, sort_key=sort_key)
('1.2.18', '1.2.18', 'some_url')
>>> _filter_out_latest(releases + [release_1_2_18], include_prerelease=True, prerelease_channel="rc/maintenance", sort_key=sort_key)
('1.2.18', '1.2.18', 'some_url')
>>> _filter_out_latest(releases + [release_1_2_18], include_prerelease=True, prerelease_channel="rc/devel", sort_key=sort_key)
('1.3.0rc1', '1.3.0rc1', 'some_url')
"""
nothing = None, None, None
+44 -11
View File
@@ -32,6 +32,13 @@ def _etag(lm=None):
connection_options = printer.__class__.get_connection_options()
plugins = sorted(octoprint.plugin.plugin_manager().enabled_plugins)
plugin_settings = _get_plugin_settings()
from collections import OrderedDict
sorted_plugin_settings = OrderedDict()
for key in sorted(plugin_settings.keys()):
sorted_plugin_settings[key] = plugin_settings.get(key, dict())
if current_user is not None and not current_user.is_anonymous():
roles = sorted(current_user.roles)
else:
@@ -39,11 +46,26 @@ def _etag(lm=None):
import hashlib
hash = hashlib.sha1()
# last modified timestamp
hash.update(str(lm))
# effective config from config.yaml + overlays
hash.update(repr(settings().effective))
# might duplicate settings().effective, but plugins might also inject additional keys into the settings
# output that are not stored in config.yaml
hash.update(repr(sorted_plugin_settings))
# connection options are also part of the settings
hash.update(repr(connection_options))
# if the list of plugins changes, the settings structure changes too
hash.update(repr(plugins))
# and likewise if the role of the user changes
hash.update(repr(roles))
return hash.hexdigest()
@api.route("/settings", methods=["GET"])
@@ -51,8 +73,6 @@ def _etag(lm=None):
lastmodified_factory=_lastmodified,
unless=lambda: request.values.get("force", "false") in valid_boolean_trues)
def getSettings():
logger = logging.getLogger(__name__)
s = settings()
connectionOptions = printer.__class__.get_connection_options()
@@ -180,32 +200,45 @@ def getSettings():
for name in gcode_scripts:
data["scripts"]["gcode"][name] = s.loadScript("gcode", name, source=True)
plugin_settings = _get_plugin_settings()
if len(plugin_settings):
data["plugins"] = plugin_settings
return jsonify(data)
def _get_plugin_settings():
logger = logging.getLogger(__name__)
data = dict()
def process_plugin_result(name, result):
if result:
try:
jsonify(test=result)
except:
logger.exception("Error while jsonifying settings from plugin {}, please contact the plugin author about this".format(name))
if not "plugins" in data:
data["plugins"] = dict()
if "__enabled" in result:
del result["__enabled"]
data["plugins"][name] = result
raise
else:
if "__enabled" in result:
del result["__enabled"]
data[name] = result
for plugin in octoprint.plugin.plugin_manager().get_implementations(octoprint.plugin.SettingsPlugin):
try:
result = plugin.on_settings_load()
process_plugin_result(plugin._identifier, result)
except TypeError:
logger.warn("Could not load settings for plugin {name} ({version}) since it called super(...)".format(name=plugin._plugin_name, version=plugin._plugin_version))
logger.warn("Could not load settings for plugin {name} ({version}) since it called super(...)".format(name=plugin._plugin_name,
version=plugin._plugin_version))
logger.warn("in a way which has issues due to OctoPrint's dynamic reloading after plugin operations.")
logger.warn("Please contact the plugin's author and ask to update the plugin to use a direct call like")
logger.warn("octoprint.plugin.SettingsPlugin.on_settings_load(self) instead.")
except:
logger.exception("Could not load settings for plugin {name} ({version})".format(version=plugin._plugin_version, name=plugin._plugin_name))
logger.exception("Could not load settings for plugin {name} ({version})".format(version=plugin._plugin_version,
name=plugin._plugin_name))
return jsonify(data)
return data
@api.route("/settings", methods=["POST"])
+7 -2
View File
@@ -777,9 +777,14 @@ function getOnlyChangedData(data, oldData) {
var retval = {};
_.forOwn(root, function(value, key) {
var oldValue = oldRoot[key];
var oldValue = undefined;
if (oldRoot != undefined && oldRoot.hasOwnProperty(key)) {
oldValue = oldRoot[key];
}
if (_.isPlainObject(value)) {
if (hasDataChanged(value, oldValue)) {
if (oldValue == undefined) {
retval[key] = value;
} else if (hasDataChanged(value, oldValue)) {
retval[key] = f(value, oldValue);
}
} else {
@@ -36,6 +36,10 @@ $(function() {
self.heaterOptions = ko.observable({});
self._printerProfileInitialized = false;
self._currentTemperatureDataBacklog = [];
self._historyTemperatureDataBacklog = [];
self._printerProfileUpdated = function() {
var graphColors = ["red", "orange", "green", "brown", "purple"];
var heaterOptions = {};
@@ -81,6 +85,10 @@ $(function() {
// write back
self.heaterOptions(heaterOptions);
self.tools(tools);
if (!self._printerProfileInitialized) {
self._triggerBacklog();
}
self.updatePlot();
};
self.settingsViewModel.printerProfiles.currentProfileData.subscribe(function() {
@@ -126,16 +134,36 @@ $(function() {
self.fromCurrentData = function(data) {
self._processStateData(data.state);
self._processTemperatureUpdateData(data.serverTime, data.temps);
if (!self._printerProfileInitialized) {
self._currentTemperatureDataBacklog.push(data);
} else {
self._processTemperatureUpdateData(data.serverTime, data.temps);
}
self._processOffsetData(data.offsets);
};
self.fromHistoryData = function(data) {
self._processStateData(data.state);
self._processTemperatureHistoryData(data.serverTime, data.temps);
if (!self._printerProfileInitialized) {
self._historyTemperatureDataBacklog.push(data);
} else {
self._processTemperatureHistoryData(data.serverTime, data.temps);
}
self._processOffsetData(data.offsets);
};
self._triggerBacklog = function() {
_.each(self._historyTemperatureDataBacklog, function(data) {
self._processTemperatureHistoryData(data.serverTime, data.temps);
});
_.each(self._currentTemperatureDataBacklog, function(data) {
self._processTemperatureUpdateData(data.serverTime, data.temps);
});
self._historyTemperatureDataBacklog = [];
self._currentTemperatureDataBacklog = [];
self._printerProfileInitialized = true;
};
self._processStateData = function(data) {
self.isErrorOrClosed(data.flags.closedOrError);
self.isOperational(data.flags.operational);
@@ -217,14 +245,17 @@ $(function() {
})
});
var filterOld = function(item) {
return item[0] >= clientTime - self.temperature_cutoff() * 60 * 1000;
};
var temperature_cutoff = self.temperature_cutoff();
if (temperature_cutoff != undefined) {
var filterOld = function(item) {
return item[0] >= clientTime - temperature_cutoff * 60 * 1000;
};
_.each(_.keys(self.heaterOptions()), function(d) {
result[d].actual = _.filter(result[d].actual, filterOld);
result[d].target = _.filter(result[d].target, filterOld);
});
_.each(_.keys(self.heaterOptions()), function(d) {
result[d].actual = _.filter(result[d].actual, filterOld);
result[d].target = _.filter(result[d].target, filterOld);
});
}
return result;
};
@@ -7,6 +7,6 @@
<p>{% trans url='http://octoprint.org/support-octoprint/' %}
If you enjoy OctoPrint, please consider <a href="{{ url }}" target="_blank">supporting its ongoing
development</a>. You can find find this link also in the "About" dialog. Thank you!
development</a>, which is fully funded by users like you! You can also find this link in the "About" dialog. <strong>Thank you!</strong>
{% endtrans %}</p>
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-11-24 12:53+0100\n"
"PO-Revision-Date: 2016-11-24 12:54+0100\n"
"POT-Creation-Date: 2016-12-02 12:37+0100\n"
"PO-Revision-Date: 2016-12-02 12:38+0100\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
@@ -1570,12 +1570,12 @@ msgstr "Trennen"
#: src/octoprint/static/js/app/viewmodels/files.js:589
#: src/octoprint/static/js/app/viewmodels/gcode.js:482
#: src/octoprint/static/js/app/viewmodels/printerstate.js:231
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
#: src/octoprint/static/js/app/viewmodels/temperature.js:62
msgid "Tool"
msgstr "Werkzeug"
#: src/octoprint/static/js/app/viewmodels/control.js:68
#: src/octoprint/static/js/app/viewmodels/temperature.js:69
#: src/octoprint/static/js/app/viewmodels/temperature.js:73
msgid "Hotend"
msgstr "Hotend"
@@ -2014,25 +2014,25 @@ msgid "Error"
msgstr "Fehler"
#: src/octoprint/static/js/app/viewmodels/temperature.js:23
#: src/octoprint/static/js/app/viewmodels/temperature.js:76
#: src/octoprint/static/js/app/viewmodels/temperature.js:80
#: src/octoprint/templates/dialogs/settings/temperatures.jinja2:16
msgid "Bed"
msgstr "Bett"
#: src/octoprint/static/js/app/viewmodels/temperature.js:115
#: src/octoprint/static/js/app/viewmodels/temperature.js:123
msgid "just now"
msgstr "gerade eben"
#: src/octoprint/static/js/app/viewmodels/temperature.js:117
#: src/octoprint/static/js/app/viewmodels/temperature.js:125
msgid "min"
msgstr "Min"
#: src/octoprint/static/js/app/viewmodels/temperature.js:261
#: src/octoprint/static/js/app/viewmodels/temperature.js:292
#: src/octoprint/templates/tabs/temperature.jinja2:11
msgid "Actual"
msgstr "Ist"
#: src/octoprint/static/js/app/viewmodels/temperature.js:266
#: src/octoprint/static/js/app/viewmodels/temperature.js:297
#: src/octoprint/templates/tabs/temperature.jinja2:12
msgid "Target"
msgstr "Soll"
@@ -2100,7 +2100,7 @@ msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:320
#, python-format
msgid "Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrag zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:329
msgid "Cannot render timelapse"
@@ -2848,8 +2848,8 @@ msgstr "Deine OctoPrint Installation ist jetzt eingerichtet und es kann losgehen
msgid ""
"\n"
" If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
" development</a>. You can find find this link also in the \"About\" dialog. Thank you!\n"
msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Du kannst diesen Link auch im \"Über\" Dialog finden. Danke!"
" development</a>, which is fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
msgstr "Falls Dir OctoPrint gefällt, bitte denke darüber nach, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>, welche vollständig durch User wie Dich finanziert wird! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Vielen Dank!</strong>"
#: src/octoprint/templates/dialogs/wizard/firstrun_start.jinja2:1
msgid "Hello!"
@@ -3695,3 +3695,9 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Reboot"
#~ msgstr "Neustart"
#~ msgid ""
#~ "\n"
#~ " If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
#~ " development</a>. It's fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
#~ msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Diese Entwicklung wird vollständig durch User wie Dich finanziert! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Danke!</strong>"
+16 -1
View File
@@ -9,6 +9,7 @@ __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms
import sarge
import logging
import re
import time
from . import to_unicode
@@ -80,7 +81,21 @@ class CommandlineCaller(object):
kwargs.update(dict(async=True, stdout=sarge.Capture(), stderr=sarge.Capture()))
p = sarge.run(command, **kwargs)
p.wait_events()
while len(p.commands) == 0:
# somewhat ugly... we can't use wait_events because
# the events might not be all set if an exception
# by sarge is triggered within the async process
# thread
time.sleep(0.01)
# by now we should have a command, let's wait for its
# process to have been prepared
p.commands[0].process_ready.wait()
if not p.commands[0].process:
# the process might have been set to None in case of any exception
self._logger.error(u"Error while trying to run command {}".format(joined_command))
return None, [], []
all_stdout = []
all_stderr = []
Binary file not shown.
+18 -12
View File
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OctoPrint\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-11-24 12:53+0100\n"
"PO-Revision-Date: 2016-11-24 12:54+0100\n"
"POT-Creation-Date: 2016-12-02 12:37+0100\n"
"PO-Revision-Date: 2016-12-02 12:38+0100\n"
"Last-Translator: Gina Häußge <osd@foosel.net>\n"
"Language: de\n"
"Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n"
@@ -1570,12 +1570,12 @@ msgstr "Trennen"
#: src/octoprint/static/js/app/viewmodels/files.js:589
#: src/octoprint/static/js/app/viewmodels/gcode.js:482
#: src/octoprint/static/js/app/viewmodels/printerstate.js:231
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
#: src/octoprint/static/js/app/viewmodels/temperature.js:62
msgid "Tool"
msgstr "Werkzeug"
#: src/octoprint/static/js/app/viewmodels/control.js:68
#: src/octoprint/static/js/app/viewmodels/temperature.js:69
#: src/octoprint/static/js/app/viewmodels/temperature.js:73
msgid "Hotend"
msgstr "Hotend"
@@ -2014,25 +2014,25 @@ msgid "Error"
msgstr "Fehler"
#: src/octoprint/static/js/app/viewmodels/temperature.js:23
#: src/octoprint/static/js/app/viewmodels/temperature.js:76
#: src/octoprint/static/js/app/viewmodels/temperature.js:80
#: src/octoprint/templates/dialogs/settings/temperatures.jinja2:16
msgid "Bed"
msgstr "Bett"
#: src/octoprint/static/js/app/viewmodels/temperature.js:115
#: src/octoprint/static/js/app/viewmodels/temperature.js:123
msgid "just now"
msgstr "gerade eben"
#: src/octoprint/static/js/app/viewmodels/temperature.js:117
#: src/octoprint/static/js/app/viewmodels/temperature.js:125
msgid "min"
msgstr "Min"
#: src/octoprint/static/js/app/viewmodels/temperature.js:261
#: src/octoprint/static/js/app/viewmodels/temperature.js:292
#: src/octoprint/templates/tabs/temperature.jinja2:11
msgid "Actual"
msgstr "Ist"
#: src/octoprint/static/js/app/viewmodels/temperature.js:266
#: src/octoprint/static/js/app/viewmodels/temperature.js:297
#: src/octoprint/templates/tabs/temperature.jinja2:12
msgid "Target"
msgstr "Soll"
@@ -2100,7 +2100,7 @@ msgstr "Zeitrafferaufnahme wird gerendert"
#: src/octoprint/static/js/app/viewmodels/timelapse.js:320
#, python-format
msgid "Now rendering timelapse %(movie_prefix)s. Due to performance reasons it is not recommended to start a print job while a movie is still rendering."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrage zu starten, so lange die Aufnahme noch gerendert wird."
msgstr "Rendere jetzt die Zeitrafferaufnahme %(movie_prefix)s. Aus Gründen der Performance ist es nicht empfehlenswert, einen Druckauftrag zu starten, so lange die Aufnahme noch gerendert wird."
#: src/octoprint/static/js/app/viewmodels/timelapse.js:329
msgid "Cannot render timelapse"
@@ -2848,8 +2848,8 @@ msgstr "Deine OctoPrint Installation ist jetzt eingerichtet und es kann losgehen
msgid ""
"\n"
" If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
" development</a>. You can find find this link also in the \"About\" dialog. Thank you!\n"
msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Du kannst diesen Link auch im \"Über\" Dialog finden. Danke!"
" development</a>, which is fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
msgstr "Falls Dir OctoPrint gefällt, bitte denke darüber nach, <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>, welche vollständig durch User wie Dich finanziert wird! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Vielen Dank!</strong>"
#: src/octoprint/templates/dialogs/wizard/firstrun_start.jinja2:1
msgid "Hello!"
@@ -3695,3 +3695,9 @@ msgstr "Zeitrafferaufnahme rendern"
#~ msgid "Reboot"
#~ msgstr "Neustart"
#~ msgid ""
#~ "\n"
#~ " If you enjoy OctoPrint, please consider <a href=\"%(url)s\" target=\"_blank\">supporting its ongoing\n"
#~ " development</a>. It's fully funded by users like you! You can also find this link in the \"About\" dialog. <strong>Thank you!</strong>\n"
#~ msgstr "Falls dir OctoPrint gefällt, bitte ziehe es in Betracht <a href=\"%(url)s\" target=\"_blank\">seine fortlaufende Entwicklung zu unterstützen</a>. Diese Entwicklung wird vollständig durch User wie Dich finanziert! Du kannst diesen Link auch im \"Über\" Dialog finden. <strong>Danke!</strong>"
+12 -11
View File
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: OctoPrint 1.3.0rc1.post95.dev0+g69412d0\n"
"Project-Id-Version: OctoPrint 1.3.0.dev1608+gefb2f99.dirty\n"
"Report-Msgid-Bugs-To: i18n@octoprint.org\n"
"POT-Creation-Date: 2016-11-24 12:53+0100\n"
"POT-Creation-Date: 2016-12-02 12:37+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1675,12 +1675,12 @@ msgstr ""
#: src/octoprint/static/js/app/viewmodels/files.js:589
#: src/octoprint/static/js/app/viewmodels/gcode.js:482
#: src/octoprint/static/js/app/viewmodels/printerstate.js:231
#: src/octoprint/static/js/app/viewmodels/temperature.js:58
#: src/octoprint/static/js/app/viewmodels/temperature.js:62
msgid "Tool"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/control.js:68
#: src/octoprint/static/js/app/viewmodels/temperature.js:69
#: src/octoprint/static/js/app/viewmodels/temperature.js:73
msgid "Hotend"
msgstr ""
@@ -2145,25 +2145,25 @@ msgid "Error"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:23
#: src/octoprint/static/js/app/viewmodels/temperature.js:76
#: src/octoprint/static/js/app/viewmodels/temperature.js:80
#: src/octoprint/templates/dialogs/settings/temperatures.jinja2:16
msgid "Bed"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:115
#: src/octoprint/static/js/app/viewmodels/temperature.js:123
msgid "just now"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:117
#: src/octoprint/static/js/app/viewmodels/temperature.js:125
msgid "min"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:261
#: src/octoprint/static/js/app/viewmodels/temperature.js:292
#: src/octoprint/templates/tabs/temperature.jinja2:11
msgid "Actual"
msgstr ""
#: src/octoprint/static/js/app/viewmodels/temperature.js:266
#: src/octoprint/static/js/app/viewmodels/temperature.js:297
#: src/octoprint/templates/tabs/temperature.jinja2:12
msgid "Target"
msgstr ""
@@ -3081,8 +3081,9 @@ msgid ""
"\n"
" If you enjoy OctoPrint, please consider <a href=\"%(url)s\" "
"target=\"_blank\">supporting its ongoing\n"
" development</a>. You can find find this link also in the \"About\" "
"dialog. Thank you!\n"
" development</a>, which is fully funded by users like you! You can "
"also find this link in the \"About\" dialog. <strong>Thank you!</strong>"
"\n"
msgstr ""
#: src/octoprint/templates/dialogs/wizard/firstrun_start.jinja2:1