Compare commits
No commits in common. "4fe61ebfbc99e4eca9c2a5949d82b73545d42ca5" and "09bd724058ddeb7d0872e7c03f6fe3f60220c076" have entirely different histories.
4fe61ebfbc
...
09bd724058
|
@ -11,10 +11,10 @@ from urllib.error import HTTPError
|
||||||
from time import time
|
from time import time
|
||||||
|
|
||||||
authors = (
|
authors = (
|
||||||
'Sasha "Almtesh" Évan MOREL',
|
'Gilles "Almtesh" Émilien MOREL',
|
||||||
)
|
)
|
||||||
name = 'homesfr pour Python 3'
|
name = 'homesfr pour Python 3'
|
||||||
version = '1.5'
|
version = '1.4'
|
||||||
|
|
||||||
# Modes utilisables
|
# Modes utilisables
|
||||||
MODE_OFF = 0
|
MODE_OFF = 0
|
||||||
|
@ -272,7 +272,6 @@ class HomeSFR ():
|
||||||
print ('initalisé avec l\'identifiant ' + username)
|
print ('initalisé avec l\'identifiant ' + username)
|
||||||
if cookies is not None:
|
if cookies is not None:
|
||||||
print ('initialisé avec des cookies')
|
print ('initialisé avec des cookies')
|
||||||
print ('Cookies ' + str (len (cookies)))
|
|
||||||
print ('debug = ' + str (debug))
|
print ('debug = ' + str (debug))
|
||||||
print ('autologin = ' + str (autologin))
|
print ('autologin = ' + str (autologin))
|
||||||
|
|
||||||
|
@ -286,8 +285,10 @@ class HomeSFR ():
|
||||||
self.autologin = False
|
self.autologin = False
|
||||||
if cookies is None:
|
if cookies is None:
|
||||||
self.cookies = CookieJar ()
|
self.cookies = CookieJar ()
|
||||||
else:
|
elif type (cookies) == CookieJar:
|
||||||
self.cookies = cookies
|
self.cookies = cookies
|
||||||
|
else:
|
||||||
|
raise TypeError ('Les cookies doivent être de type CookieJar !')
|
||||||
self.opener = request.build_opener (request.HTTPCookieProcessor (self.cookies))
|
self.opener = request.build_opener (request.HTTPCookieProcessor (self.cookies))
|
||||||
self.mysensors = self.MySensors (self)
|
self.mysensors = self.MySensors (self)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue