Code clarity fixes
autopep8 -ir -j2 --select=E303,E125 Diff checked manually.
This commit is contained in:
parent
dcb2b61b18
commit
c21d1f7925
37 changed files with 6 additions and 59 deletions
|
|
@ -136,7 +136,6 @@ class Downloadboob:
|
||||||
|
|
||||||
return u"%s/%s.%s" % (directory, removeNonAscii(video.id), ext)
|
return u"%s/%s.%s" % (directory, removeNonAscii(video.id), ext)
|
||||||
|
|
||||||
|
|
||||||
def get_linkname(self, video):
|
def get_linkname(self, video):
|
||||||
if not os.path.exists(self.links_directory):
|
if not os.path.exists(self.links_directory):
|
||||||
os.makedirs(self.links_directory)
|
os.makedirs(self.links_directory)
|
||||||
|
|
@ -151,12 +150,10 @@ class Downloadboob:
|
||||||
|
|
||||||
return u"%s/%s (%s).%s" % (self.links_directory, removeSpecial(video.title), removeSpecial(misc), ext)
|
return u"%s/%s (%s).%s" % (self.links_directory, removeSpecial(video.title), removeSpecial(misc), ext)
|
||||||
|
|
||||||
|
|
||||||
def is_downloaded(self, video):
|
def is_downloaded(self, video):
|
||||||
# check if the file is 0 byte
|
# check if the file is 0 byte
|
||||||
return os.path.isfile(self.get_filename(video))
|
return os.path.isfile(self.get_filename(video))
|
||||||
|
|
||||||
|
|
||||||
def remove_download(self, video):
|
def remove_download(self, video):
|
||||||
path = self.get_filename(video)
|
path = self.get_filename(video)
|
||||||
if os.stat(path).st_size == 0:
|
if os.stat(path).st_size == 0:
|
||||||
|
|
@ -169,7 +166,6 @@ class Downloadboob:
|
||||||
with open(path, 'w'):
|
with open(path, 'w'):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def set_linkname(self, video):
|
def set_linkname(self, video):
|
||||||
linkname = self.get_linkname(video)
|
linkname = self.get_linkname(video)
|
||||||
idname = self.get_filename(video, relative=True)
|
idname = self.get_filename(video, relative=True)
|
||||||
|
|
@ -178,7 +174,6 @@ class Downloadboob:
|
||||||
print "%s -> %s" % (linkname, idname)
|
print "%s -> %s" % (linkname, idname)
|
||||||
os.symlink(idname, linkname)
|
os.symlink(idname, linkname)
|
||||||
|
|
||||||
|
|
||||||
def do_download(self, video):
|
def do_download(self, video):
|
||||||
if not video:
|
if not video:
|
||||||
print >>sys.stderr, 'Video not found: %s' % video
|
print >>sys.stderr, 'Video not found: %s' % video
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@ class BNPVirtKeyboard(MappedVirtKeyboard):
|
||||||
return code
|
return code
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LoginPage(BasePage):
|
class LoginPage(BasePage):
|
||||||
def on_loaded(self):
|
def on_loaded(self):
|
||||||
for td in self.document.getroot().cssselect('td.LibelleErreur'):
|
for td in self.document.getroot().cssselect('td.LibelleErreur'):
|
||||||
|
|
@ -128,7 +127,6 @@ class ChangePasswordPage(BasePage):
|
||||||
|
|
||||||
cookiejar.set_cookie(c)
|
cookiejar.set_cookie(c)
|
||||||
|
|
||||||
|
|
||||||
code_current=vk.get_string_code(current)
|
code_current=vk.get_string_code(current)
|
||||||
code_new=vk.get_string_code(new)
|
code_new=vk.get_string_code(new)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ from weboob.tools.browser import BasePage
|
||||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['AccountHistory']
|
__all__ = ['AccountHistory']
|
||||||
|
|
||||||
class Transaction(FrenchTransaction):
|
class Transaction(FrenchTransaction):
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ from hellhttp import HellHTTPS
|
||||||
__all__ = ['CmbBackend']
|
__all__ = ['CmbBackend']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CmbBackend(BaseBackend, ICapBank):
|
class CmbBackend(BaseBackend, ICapBank):
|
||||||
NAME = 'cmb'
|
NAME = 'cmb'
|
||||||
MAINTAINER = u'Johann Broudin'
|
MAINTAINER = u'Johann Broudin'
|
||||||
|
|
@ -98,8 +97,6 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cookie = None
|
cookie = None
|
||||||
headers = {
|
headers = {
|
||||||
'User-Agent':
|
'User-Agent':
|
||||||
|
|
@ -197,7 +194,6 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
account._cmbvaleur2 = m.group(2)
|
account._cmbvaleur2 = m.group(2)
|
||||||
account._cmbtype = m.group(3)
|
account._cmbtype = m.group(3)
|
||||||
|
|
||||||
|
|
||||||
balance = u''.join([txt.strip() for txt in td[2].itertext()])
|
balance = u''.join([txt.strip() for txt in td[2].itertext()])
|
||||||
balance = balance.replace(',', '.').replace(u"\xa0", '')
|
balance = balance.replace(',', '.').replace(u"\xa0", '')
|
||||||
account.balance = Decimal(balance)
|
account.balance = Decimal(balance)
|
||||||
|
|
@ -252,7 +248,6 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
parser = etree.HTMLParser()
|
parser = etree.HTMLParser()
|
||||||
tree = etree.parse(StringIO(data), parser)
|
tree = etree.parse(StringIO(data), parser)
|
||||||
|
|
||||||
|
|
||||||
tables = tree.xpath('/html/body/table')
|
tables = tree.xpath('/html/body/table')
|
||||||
if len(tables) == 0:
|
if len(tables) == 0:
|
||||||
title = tree.xpath('/html/head/title')[0].text
|
title = tree.xpath('/html/head/title')[0].text
|
||||||
|
|
@ -275,7 +270,7 @@ class CmbBackend(BaseBackend, ICapBank):
|
||||||
continue
|
continue
|
||||||
for tr in table.getiterator('tr'):
|
for tr in table.getiterator('tr'):
|
||||||
if (tr.get('class') != 'LnTit' and
|
if (tr.get('class') != 'LnTit' and
|
||||||
tr.get('class') != 'LnTot'):
|
tr.get('class') != 'LnTot'):
|
||||||
operation = Transaction(i)
|
operation = Transaction(i)
|
||||||
td = tr.xpath('td')
|
td = tr.xpath('td')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ class HTTPSVerifiedConnection(httplib.HTTPSConnection):
|
||||||
This class allows communication via SSL, and will checks certificates
|
This class allows communication via SSL, and will checks certificates
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def __init__(self, host, port=None, key_file=None, cert_file=None,
|
def __init__(self, host, port=None, key_file=None, cert_file=None,
|
||||||
ca_file=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
|
ca_file=None, strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
|
||||||
callBack=None):
|
callBack=None):
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,6 @@ class ComingTransactionsPage(BasePage):
|
||||||
else:
|
else:
|
||||||
date += "/%d" % time.localtime().tm_year
|
date += "/%d" % time.localtime().tm_year
|
||||||
|
|
||||||
|
|
||||||
t = Transaction(date+""+raw)
|
t = Transaction(date+""+raw)
|
||||||
t.parse(date, re.sub(r'[ ]+', ' ', raw))
|
t.parse(date, re.sub(r'[ ]+', ' ', raw))
|
||||||
t.set_amount("", debit)
|
t.set_amount("", debit)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@ class StartPage(BasePage):
|
||||||
u"Niederschlag", u"Globalstrahlung", u"Schneehoehe"]
|
u"Niederschlag", u"Globalstrahlung", u"Schneehoehe"]
|
||||||
unit = [u"°C", u"km/h", u"hPa", u"%", u"mm", u"W/m²", u"cm"]
|
unit = [u"°C", u"km/h", u"hPa", u"%", u"mm", u"W/m²", u"cm"]
|
||||||
|
|
||||||
|
|
||||||
def get_sensors_list(self):
|
def get_sensors_list(self):
|
||||||
paraphs = self.document.xpath('//p[@align="center"]')
|
paraphs = self.document.xpath('//p[@align="center"]')
|
||||||
sensors = []
|
sensors = []
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ from weboob.tools.browser import BrokenPageError
|
||||||
from .video import EuroparlVideo
|
from .video import EuroparlVideo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['VideoPage']
|
__all__ = ['VideoPage']
|
||||||
|
|
||||||
class VideoPage(BasePage):
|
class VideoPage(BasePage):
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,6 @@ from .video import GDCVaultVideo
|
||||||
#import lxml.etree
|
#import lxml.etree
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['VideoPage']
|
__all__ = ['VideoPage']
|
||||||
|
|
||||||
class VideoPage(BasePage):
|
class VideoPage(BasePage):
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ class GoogleTranslateBackend(BaseBackend, ICapTranslate):
|
||||||
'Telugu':'te', 'Thai':'th', 'Turkish':'tr', 'Ukrainian':'uk', 'Urdu':'ur', 'Vietnamese':'vi', 'Welsh':'cy', 'Yiddish':'yi',
|
'Telugu':'te', 'Thai':'th', 'Turkish':'tr', 'Ukrainian':'uk', 'Urdu':'ur', 'Vietnamese':'vi', 'Welsh':'cy', 'Yiddish':'yi',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def translate(self, lan_from, lan_to, text):
|
def translate(self, lan_from, lan_to, text):
|
||||||
if not lan_from in self.GOOGLELANGUAGE.keys():
|
if not lan_from in self.GOOGLELANGUAGE.keys():
|
||||||
raise LanguageNotSupported()
|
raise LanguageNotSupported()
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,6 @@ class LoginPage(BasePage):
|
||||||
err = self.document.find('//span[@class="error"]')
|
err = self.document.find('//span[@class="error"]')
|
||||||
return err is not None
|
return err is not None
|
||||||
|
|
||||||
|
|
||||||
def login(self, password):
|
def login(self, password):
|
||||||
# 2) And now, the virtual Keyboard
|
# 2) And now, the virtual Keyboard
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ from .pages.inrockstv import InrocksTvPage
|
||||||
from weboob.tools.browser import BaseBrowser
|
from weboob.tools.browser import BaseBrowser
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class NewspaperInrocksBrowser(BaseBrowser):
|
class NewspaperInrocksBrowser(BaseBrowser):
|
||||||
"NewspaperInrocksBrowser class"
|
"NewspaperInrocksBrowser class"
|
||||||
PAGES = {
|
PAGES = {
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,6 @@ class ResultsPage(BasePage):
|
||||||
yield recipe
|
yield recipe
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class RecipePage(BasePage):
|
class RecipePage(BasePage):
|
||||||
""" Page which contains a recipe
|
""" Page which contains a recipe
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ class NewsfeedBackend(BaseBackend, ICapMessages):
|
||||||
CONFIG = BackendConfig(Value('url', label="Atom/RSS feed's url", regexp='https?://.*'))
|
CONFIG = BackendConfig(Value('url', label="Atom/RSS feed's url", regexp='https?://.*'))
|
||||||
STORAGE = {'seen': []}
|
STORAGE = {'seen': []}
|
||||||
|
|
||||||
|
|
||||||
def iter_threads(self):
|
def iter_threads(self):
|
||||||
for article in Newsfeed(self.config['url'].get()).iter_entries():
|
for article in Newsfeed(self.config['url'].get()).iter_entries():
|
||||||
yield self.get_thread(article.id, article)
|
yield self.get_thread(article.id, article)
|
||||||
|
|
@ -75,15 +74,12 @@ class NewsfeedBackend(BaseBackend, ICapMessages):
|
||||||
flags=flags)
|
flags=flags)
|
||||||
return thread
|
return thread
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def iter_unread_messages(self):
|
def iter_unread_messages(self):
|
||||||
for thread in self.iter_threads():
|
for thread in self.iter_threads():
|
||||||
for m in thread.iter_all_messages():
|
for m in thread.iter_all_messages():
|
||||||
if m.flags & m.IS_UNREAD:
|
if m.flags & m.IS_UNREAD:
|
||||||
yield m
|
yield m
|
||||||
|
|
||||||
|
|
||||||
def set_message_read(self, message):
|
def set_message_read(self, message):
|
||||||
self.storage.get('seen', default=[]).append(message.thread.id)
|
self.storage.get('seen', default=[]).append(message.thread.id)
|
||||||
self.storage.save()
|
self.storage.save()
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ class OkCBrowser(BaseBrowser):
|
||||||
('http://%s/profile/[^/]*' % DOMAIN, ProfilePage),
|
('http://%s/profile/[^/]*' % DOMAIN, ProfilePage),
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
logged_in = False
|
logged_in = False
|
||||||
|
|
||||||
def home(self):
|
def home(self):
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class AloesBrowser(BaseBrowser):
|
||||||
no_login=True)
|
no_login=True)
|
||||||
if not self.page.login(self.username, self.password) or \
|
if not self.page.login(self.username, self.password) or \
|
||||||
not self.is_logged() or \
|
not self.is_logged() or \
|
||||||
(self.is_on_page(LoginPage) and self.page.is_error()):
|
(self.is_on_page(LoginPage) and self.page.is_error()):
|
||||||
raise BrowserIncorrectPassword()
|
raise BrowserIncorrectPassword()
|
||||||
|
|
||||||
def get_rented_books_list(self):
|
def get_rented_books_list(self):
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,6 @@ class SubtitlesPage(BasePage):
|
||||||
return subtitle
|
return subtitle
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SubtitlePage(BasePage):
|
class SubtitlePage(BasePage):
|
||||||
""" Page which contains a single subtitle for a movie
|
""" Page which contains a single subtitle for a movie
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ class ParolesmaniaTest(BackendTest):
|
||||||
assert full_lyr.artist
|
assert full_lyr.artist
|
||||||
assert full_lyr.content is not NotLoaded
|
assert full_lyr.content is not NotLoaded
|
||||||
|
|
||||||
|
|
||||||
def test_search_artist(self):
|
def test_search_artist(self):
|
||||||
l_lyrics = list(self.backend.iter_lyrics('artist','boris'))
|
l_lyrics = list(self.backend.iter_lyrics('artist','boris'))
|
||||||
for songlyrics in l_lyrics:
|
for songlyrics in l_lyrics:
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ class ParolesmusiqueTest(BackendTest):
|
||||||
assert full_lyr.artist
|
assert full_lyr.artist
|
||||||
assert full_lyr.content is not NotLoaded
|
assert full_lyr.content is not NotLoaded
|
||||||
|
|
||||||
|
|
||||||
def test_search_artist(self):
|
def test_search_artist(self):
|
||||||
l_lyrics = list(self.backend.iter_lyrics('artist','boris'))
|
l_lyrics = list(self.backend.iter_lyrics('artist','boris'))
|
||||||
for songlyrics in l_lyrics:
|
for songlyrics in l_lyrics:
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,5 @@ class WikiEditPage(BasePage):
|
||||||
return wiki_form.xpath('div/input')[0].get('value')
|
return wiki_form.xpath('div/input')[0].get('value')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class WikiPage(BasePage):
|
class WikiPage(BasePage):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class SachsenLevelBackend(BaseBackend, ICapGauge):
|
||||||
lowpattern = pattern.lower()
|
lowpattern = pattern.lower()
|
||||||
for gauge in self.browser.get_rivers_list():
|
for gauge in self.browser.get_rivers_list():
|
||||||
if lowpattern in gauge.name.lower()\
|
if lowpattern in gauge.name.lower()\
|
||||||
or lowpattern in gauge.object.lower():
|
or lowpattern in gauge.object.lower():
|
||||||
yield gauge
|
yield gauge
|
||||||
|
|
||||||
def _get_gauge_by_id(self, id):
|
def _get_gauge_by_id(self, id):
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,6 @@ class SeeklyricsTest(BackendTest):
|
||||||
assert full_lyr.artist
|
assert full_lyr.artist
|
||||||
assert full_lyr.content is not NotLoaded
|
assert full_lyr.content is not NotLoaded
|
||||||
|
|
||||||
|
|
||||||
def test_search_artist(self):
|
def test_search_artist(self):
|
||||||
l_lyrics = list(self.backend.iter_lyrics('artist','boris vian'))
|
l_lyrics = list(self.backend.iter_lyrics('artist','boris vian'))
|
||||||
for songlyrics in l_lyrics:
|
for songlyrics in l_lyrics:
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ from weboob.capabilities.messages import CantSendMessage
|
||||||
from weboob.tools.browser import BasePage
|
from weboob.tools.browser import BasePage
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['ClosePage', 'ComposePage', 'ConfirmPage', 'SentPage']
|
__all__ = ['ClosePage', 'ComposePage', 'ConfirmPage', 'SentPage']
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,6 @@ class AccountHistory(BasePage):
|
||||||
sign=p['sign'][0],
|
sign=p['sign'][0],
|
||||||
src=p['src'][0])
|
src=p['src'][0])
|
||||||
|
|
||||||
|
|
||||||
def _iter_transactions(self, doc, coming):
|
def _iter_transactions(self, doc, coming):
|
||||||
t = None
|
t = None
|
||||||
for i, tr in enumerate(self.parser.select(doc.getroot(), 'tr')):
|
for i, tr in enumerate(self.parser.select(doc.getroot(), 'tr')):
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ from weboob.tools.browser import BrokenPageError
|
||||||
from .video import VimeoVideo
|
from .video import VimeoVideo
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['VideoPage']
|
__all__ = ['VideoPage']
|
||||||
|
|
||||||
class VideoPage(BasePage):
|
class VideoPage(BasePage):
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ from weboob.tools.test import BackendTest
|
||||||
class WeatherTest(BackendTest):
|
class WeatherTest(BackendTest):
|
||||||
BACKEND = 'weather'
|
BACKEND = 'weather'
|
||||||
|
|
||||||
|
|
||||||
def test_cities(self):
|
def test_cities(self):
|
||||||
paris = self.backend.iter_city_search('crappything¶m=;drop database')
|
paris = self.backend.iter_city_search('crappything¶m=;drop database')
|
||||||
self.assertTrue(len(list(paris)) == 0)
|
self.assertTrue(len(list(paris)) == 0)
|
||||||
|
|
|
||||||
|
|
@ -764,7 +764,6 @@ class Boobathon(ReplApplication):
|
||||||
print >>sys.stderr, "There isn't any task in progress."
|
print >>sys.stderr, "There isn't any task in progress."
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
def load_default_backends(self):
|
def load_default_backends(self):
|
||||||
"""
|
"""
|
||||||
Overload a BaseApplication method.
|
Overload a BaseApplication method.
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,6 @@ class Boobill(ReplApplication):
|
||||||
self.download_all(dest, names)
|
self.download_all(dest, names)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
if dest is None:
|
if dest is None:
|
||||||
for backend, bill in self.do('get_bill', id, backends=names):
|
for backend, bill in self.do('get_bill', id, backends=names):
|
||||||
dest = id + "." + bill.format
|
dest = id + "." + bill.format
|
||||||
|
|
@ -215,5 +214,4 @@ class Boobill(ReplApplication):
|
||||||
print >>sys.stderr, 'Unable to write bill in "%s": %s' % (dest, e)
|
print >>sys.stderr, 'Unable to write bill in "%s": %s' % (dest, e)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -559,7 +559,6 @@ class Cineoob(ReplApplication):
|
||||||
self.format(subtitle)
|
self.format(subtitle)
|
||||||
self.flush()
|
self.flush()
|
||||||
|
|
||||||
|
|
||||||
def complete_getfile_subtitle(self, text, line, *ignored):
|
def complete_getfile_subtitle(self, text, line, *ignored):
|
||||||
args = line.split(' ', 2)
|
args = line.split(' ', 2)
|
||||||
if len(args) == 2:
|
if len(args) == 2:
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,6 @@ class MasstransitHildon():
|
||||||
self.treestore = gtk.TreeStore(str, str, str, str, str)
|
self.treestore = gtk.TreeStore(str, str, str, str, str)
|
||||||
treeview = gtk.TreeView(self.treestore)
|
treeview = gtk.TreeView(self.treestore)
|
||||||
|
|
||||||
|
|
||||||
treeview.append_column(
|
treeview.append_column(
|
||||||
gtk.TreeViewColumn(
|
gtk.TreeViewColumn(
|
||||||
'Train',
|
'Train',
|
||||||
|
|
@ -166,8 +165,6 @@ class MasstransitHildon():
|
||||||
text=4
|
text=4
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vertical_box = gtk.VBox()
|
vertical_box = gtk.VBox()
|
||||||
vertical_box.pack_start(horizontal_box)
|
vertical_box.pack_start(horizontal_box)
|
||||||
horizontal_box.pack_start(self.retour_button)
|
horizontal_box.pack_start(self.retour_button)
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,6 @@ class MainWindow(QtMainWindow):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def setHousing(self, housing, nottext='Loading...'):
|
def setHousing(self, housing, nottext='Loading...'):
|
||||||
if self.housing is not None:
|
if self.housing is not None:
|
||||||
self.saveNotes()
|
self.saveNotes()
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ class ThreadMessage(QFrame):
|
||||||
content = message.content.replace('&', '&').replace('<', '<').replace('>', '>').replace('\n', '<br />')
|
content = message.content.replace('&', '&').replace('<', '<').replace('>', '>').replace('\n', '<br />')
|
||||||
self.ui.contentLabel.setText(content)
|
self.ui.contentLabel.setText(content)
|
||||||
|
|
||||||
|
|
||||||
def __eq__(self, m):
|
def __eq__(self, m):
|
||||||
if not isinstance(m, Message):
|
if not isinstance(m, Message):
|
||||||
return False
|
return False
|
||||||
|
|
@ -199,8 +198,6 @@ class ContactThread(QWidget):
|
||||||
self.process_reply = None
|
self.process_reply = None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class ContactProfile(QWidget):
|
class ContactProfile(QWidget):
|
||||||
|
|
||||||
def __init__(self, weboob, contact, parent=None):
|
def __init__(self, weboob, contact, parent=None):
|
||||||
|
|
@ -362,7 +359,6 @@ class ContactNotes(QWidget):
|
||||||
|
|
||||||
self.connect(self.ui.saveButton, SIGNAL('clicked()'), self.saveNotes)
|
self.connect(self.ui.saveButton, SIGNAL('clicked()'), self.saveNotes)
|
||||||
|
|
||||||
|
|
||||||
def _getNotes_cb(self, backend, data):
|
def _getNotes_cb(self, backend, data):
|
||||||
if not backend or not data:
|
if not backend or not data:
|
||||||
self.process = None
|
self.process = None
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ class MainWindow(QtMainWindow):
|
||||||
def updateVideosDisplay(self):
|
def updateVideosDisplay(self):
|
||||||
for minivideo in self.minivideos:
|
for minivideo in self.minivideos:
|
||||||
if (minivideo.video.nsfw and self.ui.nsfwCheckBox.isChecked() or
|
if (minivideo.video.nsfw and self.ui.nsfwCheckBox.isChecked() or
|
||||||
not minivideo.video.nsfw and self.ui.sfwCheckBox.isChecked()):
|
not minivideo.video.nsfw and self.ui.sfwCheckBox.isChecked()):
|
||||||
minivideo.show()
|
minivideo.show()
|
||||||
else:
|
else:
|
||||||
minivideo.hide()
|
minivideo.hide()
|
||||||
|
|
@ -119,7 +119,7 @@ class MainWindow(QtMainWindow):
|
||||||
self.ui.scrollAreaContent.layout().addWidget(minivideo)
|
self.ui.scrollAreaContent.layout().addWidget(minivideo)
|
||||||
self.minivideos.append(minivideo)
|
self.minivideos.append(minivideo)
|
||||||
if (video.nsfw and not self.ui.nsfwCheckBox.isChecked() or
|
if (video.nsfw and not self.ui.nsfwCheckBox.isChecked() or
|
||||||
not video.nsfw and not self.ui.sfwCheckBox.isChecked()):
|
not video.nsfw and not self.ui.sfwCheckBox.isChecked()):
|
||||||
minivideo.hide()
|
minivideo.hide()
|
||||||
|
|
||||||
def openURL(self):
|
def openURL(self):
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,6 @@ class Suboob(ReplApplication):
|
||||||
self.format(subtitle)
|
self.format(subtitle)
|
||||||
self.flush()
|
self.flush()
|
||||||
|
|
||||||
|
|
||||||
def complete_getfile(self, text, line, *ignored):
|
def complete_getfile(self, text, line, *ignored):
|
||||||
args = line.split(' ', 2)
|
args = line.split(' ', 2)
|
||||||
if len(args) == 2:
|
if len(args) == 2:
|
||||||
|
|
|
||||||
|
|
@ -639,7 +639,6 @@ class Repositories(object):
|
||||||
except BrowserUnavailable, e:
|
except BrowserUnavailable, e:
|
||||||
raise ModuleInstallError('Unable to fetch module: %s' % e)
|
raise ModuleInstallError('Unable to fetch module: %s' % e)
|
||||||
|
|
||||||
|
|
||||||
# Check signature
|
# Check signature
|
||||||
if module.signed and Keyring.find_gpgv():
|
if module.signed and Keyring.find_gpgv():
|
||||||
progress.progress(0.5, 'Checking module authenticity...')
|
progress.progress(0.5, 'Checking module authenticity...')
|
||||||
|
|
@ -651,7 +650,6 @@ class Repositories(object):
|
||||||
if not keyring.is_valid(tardata, sig_data):
|
if not keyring.is_valid(tardata, sig_data):
|
||||||
raise ModuleInstallError('Invalid signature for %s.' % module.name)
|
raise ModuleInstallError('Invalid signature for %s.' % module.name)
|
||||||
|
|
||||||
|
|
||||||
# Extract module from tarball.
|
# Extract module from tarball.
|
||||||
if os.path.isdir(module_dir):
|
if os.path.isdir(module_dir):
|
||||||
shutil.rmtree(module_dir)
|
shutil.rmtree(module_dir)
|
||||||
|
|
|
||||||
|
|
@ -381,7 +381,7 @@ class BackendCfg(QDialog):
|
||||||
', '.join(sorted(cap.__name__.replace('ICap', '') for cap in module.iter_caps()))))
|
', '.join(sorted(cap.__name__.replace('ICap', '') for cap in module.iter_caps()))))
|
||||||
|
|
||||||
if module.has_caps(ICapAccount) and self.ui.nameEdit.isEnabled() and \
|
if module.has_caps(ICapAccount) and self.ui.nameEdit.isEnabled() and \
|
||||||
module.klass.ACCOUNT_REGISTER_PROPERTIES is not None:
|
module.klass.ACCOUNT_REGISTER_PROPERTIES is not None:
|
||||||
self.ui.registerButton.show()
|
self.ui.registerButton.show()
|
||||||
else:
|
else:
|
||||||
self.ui.registerButton.hide()
|
self.ui.registerButton.hide()
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,6 @@ class ReplApplication(Cmd, ConsoleApplication):
|
||||||
|
|
||||||
return cmd, arg, ignored
|
return cmd, arg, ignored
|
||||||
|
|
||||||
|
|
||||||
def onecmd(self, line):
|
def onecmd(self, line):
|
||||||
"""
|
"""
|
||||||
This REPL method is overrided to catch some particular exceptions.
|
This REPL method is overrided to catch some particular exceptions.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue