Some manual style fixes
This commit is contained in:
parent
e0542c2e4a
commit
fbe0fb8d52
10 changed files with 18 additions and 14 deletions
|
|
@ -27,7 +27,8 @@ except ImportError:
|
|||
raise ImportError('Please install python-imaging')
|
||||
|
||||
|
||||
class CaptchaError(Exception): pass
|
||||
class CaptchaError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class Tile(object):
|
||||
|
|
|
|||
|
|
@ -74,8 +74,10 @@ class AccountHistory(BasePage):
|
|||
text = tds[1].text or u''
|
||||
text = text.replace(u'\xa0', u'')
|
||||
for child in tds[1].getchildren():
|
||||
if child.text: text += child.text
|
||||
if child.tail: text += child.tail
|
||||
if child.text:
|
||||
text += child.text
|
||||
if child.tail:
|
||||
text += child.tail
|
||||
|
||||
i += 1
|
||||
operation = Transaction(i)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class AccountList(BasePage):
|
|||
return
|
||||
|
||||
lines = tables[0].xpath(".//tbody/tr")
|
||||
for line in lines:
|
||||
for line in lines:
|
||||
account = Account()
|
||||
tmp = line.xpath("./td//a")[0]
|
||||
account.label = to_unicode(tmp.text)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class IndexPage(DLFPPage):
|
|||
form = self.parser.select(self.document.getroot(), 'form#new_account_sidebar', 1)
|
||||
for i in form.find('div').getiterator('input'):
|
||||
if i.attrib['name'] == 'authenticity_token':
|
||||
return i.attrib['value']
|
||||
return i.attrib['value']
|
||||
|
||||
|
||||
class LoginPage(DLFPPage):
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ def parse_dt(s):
|
|||
now = datetime.datetime.now()
|
||||
if s is None:
|
||||
return local2utc(now)
|
||||
if 'minutes ago' in s:
|
||||
if 'minutes ago' in s:
|
||||
m = int(s.split()[0])
|
||||
d = now - datetime.timedelta(minutes=m)
|
||||
elif u'–' in s:
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class AloesBrowser(BaseBrowser):
|
|||
self.location('%s://%s/index.aspx'
|
||||
% (self.PROTOCOL, self.BASEURL),
|
||||
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 \
|
||||
(self.is_on_page(LoginPage) and self.page.is_error()):
|
||||
raise BrowserIncorrectPassword()
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class MasstransitHildon():
|
|||
status = event.get_status()
|
||||
if status == conic.STATUS_CONNECTED:
|
||||
self.connected = True
|
||||
if self.touch_selector_entry_filled == False:
|
||||
if not self.touch_selector_entry_filled:
|
||||
debug("connected, now fill")
|
||||
self.fill_touch_selector_entry()
|
||||
if self.refresh_in_progress:
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os,codecs
|
||||
import os
|
||||
import codecs
|
||||
|
||||
from PyQt4.QtCore import SIGNAL, Qt, QStringList
|
||||
from PyQt4.QtGui import QApplication, QCompleter
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ class Weboob(object):
|
|||
if len(_backends) > 0:
|
||||
try:
|
||||
backends = [self.backend_instances[_backends]]
|
||||
except (ValueError,KeyError):
|
||||
except (ValueError, KeyError):
|
||||
backends = []
|
||||
elif isinstance(_backends, (list, tuple, set)):
|
||||
backends = []
|
||||
|
|
@ -333,7 +333,7 @@ class Weboob(object):
|
|||
if isinstance(backend, basestring):
|
||||
try:
|
||||
backends.append(self.backend_instances[backend])
|
||||
except (ValueError,KeyError):
|
||||
except (ValueError, KeyError):
|
||||
pass
|
||||
else:
|
||||
backends.append(backend)
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ class MediaPlayer(object):
|
|||
media_url = media.url
|
||||
try:
|
||||
player_url = media.swf_player
|
||||
if media.swf_player:
|
||||
if media.swf_player:
|
||||
rtmp = 'rtmpdump -r %s --swfVfy %s' % (media_url, player_url)
|
||||
else:
|
||||
rtmp = 'rtmpdump -r %s' % media_url
|
||||
|
|
@ -123,7 +123,7 @@ class MediaPlayer(object):
|
|||
|
||||
rtmp += ' --quiet'
|
||||
|
||||
if args is None :
|
||||
if args is None:
|
||||
for (binary, stdin_args) in PLAYERS:
|
||||
if binary == player_name:
|
||||
args = stdin_args
|
||||
|
|
@ -139,7 +139,7 @@ class MediaPlayer(object):
|
|||
p1 = Popen(rtmp.split(), stdout=PIPE)
|
||||
Popen(player_name + args, stdin=p1.stdout, stderr=PIPE)
|
||||
|
||||
def _find_in_path(self,path, filename):
|
||||
def _find_in_path(self, path, filename):
|
||||
for i in path.split(':'):
|
||||
if os.path.exists('/'.join([i, filename])):
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue