Merge branch 'devel' into dev/largeFileUpload

This commit is contained in:
Gina Häußge 2014-08-05 19:59:05 +02:00
commit f2092ee89c
2 changed files with 11 additions and 1 deletions

View file

@ -165,7 +165,12 @@ def performSystemAction():
if availableAction["action"] == action:
logger.info("Performing command: %s" % availableAction["command"])
try:
p = sarge.run(availableAction["command"], stderr=sarge.Capture())
# Note: we put the command in brackets since sarge (up to the most recently released version) has
# a bug concerning shell=True commands. Once sarge 0.1.4 we can upgrade to that and remove this
# workaround again
#
# See https://bitbucket.org/vinay.sajip/sarge/issue/21/behavior-is-not-like-popen-using-shell
p = sarge.run([availableAction["command"]], stderr=sarge.Capture(), shell=True)
if p.returncode != 0:
returncode = p.returncode
stderr_text = p.stderr.text

View file

@ -106,13 +106,18 @@ function GcodeFilesViewModel(printerStateViewModel, loginStateViewModel) {
self.isSdReady(data.flags.sdReady);
};
self._otherRequestInProgress = false;
self.requestData = function(filenameToFocus, locationToFocus) {
if (self._otherRequestInProgress) return;
self._otherRequestInProgress = true;
$.ajax({
url: API_BASEURL + "files",
method: "GET",
dataType: "json",
success: function(response) {
self.fromResponse(response, filenameToFocus, locationToFocus);
self._otherRequestInProgress = false;
}
});
};