Fixed typo
This commit is contained in:
committed by
Ruud
parent
afea12c7c0
commit
e36c8ec3ab
@@ -1,11 +1,9 @@
|
|||||||
from base64 import b64encode
|
|
||||||
from couchpotato.core.downloaders.base import Downloader
|
from couchpotato.core.downloaders.base import Downloader
|
||||||
from couchpotato.core.helpers.encoding import isInt
|
from couchpotato.core.helpers.encoding import isInt
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
import httplib
|
import httplib
|
||||||
import json
|
import json
|
||||||
import os.path
|
|
||||||
import re
|
|
||||||
import urllib2
|
import urllib2
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
@@ -60,14 +58,14 @@ class SynologyRPC(object):
|
|||||||
|
|
||||||
def _login(self):
|
def _login(self):
|
||||||
if self.username and self.password:
|
if self.username and self.password:
|
||||||
args = {'api': 'SYNO.API.Auth', 'account': self.username, 'passwd': self.password, 'version': 2,
|
args = {'api': 'SYNO.API.Auth', 'account': self.username, 'passwd': self.password, 'version': 2,
|
||||||
'method': 'login', 'session': self.session_name, 'format': 'sid'}
|
'method': 'login', 'session': self.session_name, 'format': 'sid'}
|
||||||
response = self._req(self.Authurl, args)
|
response = self._req(self.Authurl, args)
|
||||||
if response['success'] == True:
|
if response['success'] == True:
|
||||||
self.sid = response['data']['sid']
|
self.sid = response['data']['sid']
|
||||||
log.debug( "Sid=%s", self.sid)
|
log.debug( "Sid=%s", self.sid)
|
||||||
return response
|
return response
|
||||||
elif username or password:
|
elif self.username or self.password:
|
||||||
log.error('User or password missing, not using authentication.')
|
log.error('User or password missing, not using authentication.')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user