Skip to content

Commit

Permalink
fix(rest): #96 falcon breaks compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
DSilence authored and werwolfby committed Jul 13, 2016
1 parent a15901c commit a643156
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MonitorrentInstaller/MonitorrentInstaller/Product.wxs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Monitorrent" Language="1033" Version="1.0.0.1000" Manufacturer="Monitorrent Team" UpgradeCode="dd4cf505-1e44-4311-a8f2-efcf097175a7">
<Product Id="*" Name="Monitorrent" Language="1033" Version="1.0.1.0" Manufacturer="Monitorrent Team" UpgradeCode="dd4cf505-1e44-4311-a8f2-efcf097175a7">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes"/>
Expand Down
6 changes: 3 additions & 3 deletions monitorrent/rest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MonitorrentResponse(falcon.Response):

# noinspection PyMethodMayBeStatic,PyMethodMayBeStatic,PyUnusedLocal
class JSONTranslator(object):
def process_resource(self, req, resp, resource):
def process_resource(self, req, resp, resource, params):
"""
:type req: MonitorrentRequest
:type resp: MonitorrentResponse
Expand Down Expand Up @@ -62,12 +62,12 @@ class AuthMiddleware(object):
token = None
auth_enabled = None

def process_resource(self, req, resp, resource):
def process_resource(self, req, resp, resource, params):
if getattr(resource, '__no_auth__', False):
return

if not self.validate_auth(req):
raise falcon.HTTPUnauthorized('Authentication required', 'AuthCookie is not specified')
raise falcon.HTTPUnauthorized('Authentication required', 'AuthCookie is not specified', None)

@classmethod
def validate_auth(cls, req):
Expand Down
2 changes: 1 addition & 1 deletion monitorrent/rest/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def on_post(self, req, resp):
raise falcon.HTTPBadRequest('WrongPassword', 'password is not specified')
password = body['password']
if password != self.settings_manager.get_password():
raise falcon.HTTPUnauthorized('WrongPassword', 'password is not correct')
raise falcon.HTTPUnauthorized('WrongPassword', 'password is not correct', None)
AuthMiddleware.authenticate(resp)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "monitorrent",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"main": "index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ beautifulsoup4>=4.4.0
deluge-client>=1.0.2
feedparser>=5.2.1
alembic>=0.7.6
falcon
falcon>=1.0.0
itsdangerous
html5lib
dateutils
Expand Down

0 comments on commit a643156

Please sign in to comment.