Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sick-Beard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
Sick-Beard
Commits
da29cc89
Commit
da29cc89
authored
Dec 7, 2011
by
Nic Wolfe
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some more warnings
parent
9d849c2b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sickbeard/webserve.py
+6
-2
6 additions, 2 deletions
sickbeard/webserve.py
with
6 additions
and
2 deletions
sickbeard/webserve.py
+
6
−
2
View file @
da29cc89
...
...
@@ -25,6 +25,7 @@ import urllib
import
re
import
threading
import
datetime
import
random
from
Cheetah.Template
import
Template
import
cherrypy.lib
...
...
@@ -633,16 +634,19 @@ class ConfigGeneral:
def
generateKey
(
self
):
"""
Return a new randomized API_KEY
"""
try
:
from
hashlib
import
md5
except
ImportError
:
from
md5
import
md5
import
random
# Create some values to seed md5
t
=
str
(
time
.
time
())
r
=
str
(
random
.
random
())
# Create the md5 instance and give it the current time
m
=
md5
(
t
)
# Update the md5 instance with the random variable
m
.
update
(
r
)
...
...
@@ -1862,7 +1866,7 @@ class Home:
def
testSABnzbd
(
self
,
host
=
None
,
username
=
None
,
password
=
None
,
apikey
=
None
):
connection
,
accesMsg
=
sab
.
getSabAccesMethod
(
host
,
username
,
password
,
apikey
)
if
connection
:
authed
,
authMsg
=
sab
.
testAuthentication
(
host
,
username
,
password
,
apikey
)
authed
,
authMsg
=
sab
.
testAuthentication
(
host
,
username
,
password
,
apikey
)
#@UnusedVariable
if
authed
:
return
"
Success. Connected and authenticated
"
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment