summaryrefslogtreecommitdiffstats
path: root/pyload
diff options
context:
space:
mode:
Diffstat (limited to 'pyload')
-rw-r--r--pyload/remote/wsbackend/Server.py3
-rw-r--r--pyload/web/app/scripts/models/Account.js10
2 files changed, 11 insertions, 2 deletions
diff --git a/pyload/remote/wsbackend/Server.py b/pyload/remote/wsbackend/Server.py
index d6b25dfda..02da44f04 100644
--- a/pyload/remote/wsbackend/Server.py
+++ b/pyload/remote/wsbackend/Server.py
@@ -466,7 +466,8 @@ class WebSocketRequestHandler(CGIHTTPServer.CGIHTTPRequestHandler):
self, request, client_address, server)
except socket.error, e:
# Broken pipe, let it pass
- if e.errno != 32:
+ errno = e.args[0] # errno on py < 2.6
+ if errno != 32:
raise
self._logger.debug("WS: Broken pipe")
diff --git a/pyload/web/app/scripts/models/Account.js b/pyload/web/app/scripts/models/Account.js
index dc453ef3c..26241d8e3 100644
--- a/pyload/web/app/scripts/models/Account.js
+++ b/pyload/web/app/scripts/models/Account.js
@@ -28,6 +28,14 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt
},
+ // representation handled by server
+ toServerJSON: function() {
+ var data = this.toJSON();
+ delete data.config;
+
+ return data;
+ },
+
parse: function(resp) {
// Convert config to models
resp.config = _.map(resp.config, function(item) {
@@ -78,7 +86,7 @@ define(['jquery', 'backbone', 'underscore', 'app', 'utils/apitypes', './ConfigIt
},
destroy: function(options) {
- options = App.apiRequest('removeAccount', {account: this.toJSON()}, options);
+ options = App.apiRequest('removeAccount', {account: this.toServerJSON()}, options);
var self = this;
options.success = function() {
self.trigger('destroy', self, self.collection, options);