bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
446,000
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
446,001
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
446,002
def get_list(self): l = [] for tr in self.document.getiterator('tr'): if tr.attrib.get('class', '') == 'comptes': account = Account() for td in tr.getiterator('td'): if td.attrib.get('headers', '').startswith('Numero_'): id = td.text account.id = ''.join(id.split(' ')).strip() elif td.attrib.get('headers', '').startswi...
def get_list(self): l = [] for tr in self.document.getiterator('tr'): if tr.attrib.get('class', '') == 'comptes': account = Account() for td in tr.getiterator('td'): if td.attrib.get('headers', '').startswith('Numero_'): id = td.text account.id = ''.join(id.split(' ')).strip() elif td.attrib.get('headers', '').startswi...
446,003
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
def get_contact(self, contact): try: with self.browser: profile = self.browser.get_profide(_id)
446,004
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
446,005
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
446,006
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
446,007
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
446,008
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
def get_contact(self, _id): try: with self.browser: profile = self.browser.get_profide(_id)
446,009
def iter_contacts(self, status=Contact.STATUS_ALL, ids=None): with self.browser: for contact in self.browser.iter_contacts(): s = 0 if contact['cat'] == 1: s = Contact.STATUS_ONLINE elif contact['cat'] == 3: s = Contact.STATUS_OFFLINE elif contact['cat'] == 2: s = Contact.STATUS_AWAY else: warning('Unknown AuM contact ...
def iter_contacts(self, status=Contact.STATUS_ALL, ids=None): with self.browser: for contact in self.browser.iter_contacts(): s = 0 if contact['cat'] == 1: s = Contact.STATUS_ONLINE elif contact['cat'] == 3: s = Contact.STATUS_OFFLINE elif contact['cat'] == 2: s = Contact.STATUS_AWAY else: warning('Unknown AuM contact ...
446,010
def get_date_and_duration(self): duration_regexp = re.compile('(.+) - (.+)min(.+)s') el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0] if el is not None: m = duration_regexp.match(el.text.strip()) if m: day, month, year = [int(s) for s in m.group(1).split('/')] date = datetime.datetime(year, mon...
def get_date_and_duration(self): duration_regexp = re.compile('(.+) - ((.+)h)?((.+)min)?(.+)s') el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0] if el is not None: m = duration_regexp.match(el.text.strip()) if m: day, month, year = [int(s) for s in m.group(1).split('/')] date = datetime.datetim...
446,011
def get_date_and_duration(self): duration_regexp = re.compile('(.+) - (.+)min(.+)s') el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0] if el is not None: m = duration_regexp.match(el.text.strip()) if m: day, month, year = [int(s) for s in m.group(1).split('/')] date = datetime.datetime(year, mon...
def get_date_and_duration(self): duration_regexp = re.compile('(.+) - (.+)min(.+)s') el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0] if el is not None: m = duration_regexp.match(el.text.strip()) if m: day, month, year = [int(s) for s in m.group(1).split('/')] date = datetime.datetime(year, mon...
446,012
def get_date_and_duration(self): duration_regexp = re.compile('(.+) - (.+)min(.+)s') el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0] if el is not None: m = duration_regexp.match(el.text.strip()) if m: day, month, year = [int(s) for s in m.group(1).split('/')] date = datetime.datetime(year, mon...
def get_date_and_duration(self): duration_regexp = re.compile('(.+) - (.+)min(.+)s') el = self.document.getroot().cssselect('div.bloc-produit-haut p.date')[0] if el is not None: m = duration_regexp.match(el.text.strip()) if m: day, month, year = [int(s) for s in m.group(1).split('/')] date = datetime.datetime(year, mon...
446,013
def __init__(self, default=None, is_masked=False, regexp=None, description=None, choices=None): self.default = default self.is_masked = is_masked self.regexp = regexp self.description = description self.choices=None
def __init__(self, default=None, is_masked=False, regexp=None, description=None, choices=None): self.default = default self.is_masked = is_masked self.regexp = regexp self.description = description self.choices=None
446,014
def __init__(self, weboob, name, config, storage): self.weboob = weboob self.name = name self.lock = RLock()
def __init__(self, weboob, name, config, storage): self.weboob = weboob self.name = name self.lock = RLock()
446,015
def __init__(self, weboob, name, config, storage): self.weboob = weboob self.name = name self.lock = RLock()
def __init__(self, weboob, name, config, storage): self.weboob = weboob self.name = name self.lock = RLock()
446,016
def get_thread(self, id): if isinstance(id, Thread): thread = id id = thread.id else: thread = None
def get_thread(self, id): if isinstance(id, Thread): thread = id id = thread.id else: thread = None
446,017
def _insert_comment(self, com, parent): """" Insert 'com' comment and its children in the parent message. """ flags = Message.IS_HTML if not com.id in self.storage.get('seen', parent.thread.id, 'comments', default=[]): flags |= Message.IS_UNREAD
def _insert_comment(self, com, parent): """" Insert 'com' comment and its children in the parent message. """ flags = Message.IS_HTML if not com.id in self.storage.get('seen', parent.thread.id, 'comments', default=[]): flags |= Message.IS_UNREAD
446,018
def parse(self, data, encoding): s = data.read() s = s.replace('<?Pub Caret>', '') data = StringIO(s) return ElementTidyParser.parse(self, data, encoding)
def parse(self, data, encoding): s = data.read() s = s.replace('<?Pub Caret>', '') data = StringIO(s) return ElementTidyParser.parse(self, data, encoding)
446,019
def _play_rtmp(self, media): """ Download data with rtmpdump and pipe them to a media player.
def _play_rtmp(self, media): """ Download data with rtmpdump and pipe them to a media player.
446,020
def _play_rtmp(self, media): """ Download data with rtmpdump and pipe them to a media player.
def _play_rtmp(self, media): """ Download data with rtmpdump and pipe them to a media player.
446,021
def _play_rtmp(self, media): """ Download data with rtmpdump and pipe them to a media player.
def _play_rtmp(self, media): """ Download data with rtmpdump and pipe them to a media player.
446,022
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
446,023
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
446,024
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
446,025
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
def parse_table(self, div): d = self.table[self.tables[div.getAttribute('id')]] fields = self.fields[self.tables[div.getAttribute('id')]] table = div.getElementsByTagName('table')[1]
446,026
def test_youjizz(self): self.assertTrue(len(self.backend.iter_search_results('anus', nsfw=False)) == 0)
def test_youjizz(self): self.assertTrue(len(self.backend.iter_search_results('anus', nsfw=False)) == 0)
446,027
def command_modinfo(self, name): try: module = self.weboob.modules_loader.modules[name] except KeyError: print >>sys.stderr, 'No such module: %s' % name return 1
def command_modinfo(self, name): try: module = self.weboob.modules_loader.get_or_load_module(name) except KeyError: print >>sys.stderr, 'No such module: %s' % name return 1
446,028
def do_confirm(self, backend_name): """ confirm BACKEND
def do_confirm(self, backend_name): """ confirm BACKEND
446,029
def _caller(self, backend, function, args, kwargs): debug('%s: Thread created successfully' % backend) with backend: try: # Call method on backend try: debug('%s: Calling function %s' % (backend, function)) if callable(function): result = function(backend, *args, **kwargs) else: result = getattr(backend, function)(*arg...
def _caller(self, backend, function, args, kwargs): debug('%s: Thread created successfully' % backend) with backend: try: # Call method on backend try: debug('%s: Calling function %s' % (backend, function)) if callable(function): result = function(backend, *args, **kwargs) else: result = getattr(backend, function)(*arg...
446,030
def _complete_obj(self, backend, obj, fields): if fields: if '*' in fields: fields = [k for k, v in iter_fields(obj)] try: backend.fillobj(obj, fields) except ObjectNotAvailable, e: logging.warning(u'Could not retrieve required fields (%s): %s' % (','.join(fields), e)) for field in set(fields) - set('*'): if getattr(ob...
def _complete_obj(self, backend, fields, obj): if fields: if '*' in fields: fields = [k for k, v in iter_fields(obj)] try: backend.fillobj(obj, fields) except ObjectNotAvailable, e: logging.warning(u'Could not retrieve required fields (%s): %s' % (','.join(fields), e)) for field in set(fields) - set('*'): if getattr(ob...
446,031
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
446,032
def get_list(self): """ Returns the list of available bank accounts """ l = []
def get_list(self): """ Returns the list of available bank accounts """ l = []
446,033
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
446,034
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
446,035
def icon_path(self): if self.klass.ICON is None: self.klass.ICON = xdg.IconTheme.getIconPath(self.klass.NAME) return self.klass.ICON
def icon_path(self): if self.klass.ICON is None: try: import xdg.IconTheme except ImportError: pass else: self.klass.ICON = xdg.IconTheme.getIconPath(self.klass.NAME) return self.klass.ICON
446,036
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,037
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,038
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,039
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,040
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,041
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,042
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,043
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
def _iter_messages(self, thread, only_new): with self.browser: try: profiles = {}
446,044
def activity_fakes(self): try: fakes = self.storage.get('priority_connection', 'fakes', default={}) if len(fakes) == 0: return while 1: name = random.choice(fakes.keys()) fake = fakes[name] try: browser = AuMBrowser(fake['username'], fake['password'], proxy=self.browser.proxy) except (AdopteBanned,BrowserIncorrectPassw...
def activity_fakes(self): try: fakes = self.storage.get('priority_connection', 'fakes', default={}) if len(fakes) == 0: return while 1: name = random.choice(fakes.keys()) fake = fakes[name] try: browser = AuMBrowser(fake['username'], fake['password'], proxy=self.browser.proxy) except (AdopteBanned,BrowserIncorrectPassw...
446,045
def __eq__(self, msg): return self.thread.id == msg.thread.id and self.id == msg.id
def __eq__(self, msg): return self.thread.id == msg.thread.id and self.id == msg.id
446,046
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
def do(self, function, *args, **kwargs): """ Do calls on loaded backends with specified arguments, in separated threads.
446,047
def icon_path(self): if self.klass.ICON is None: try: import xdg.IconTheme except ImportError: pass else: self.klass.ICON = xdg.IconTheme.getIconPath(self.klass.NAME) return self.klass.ICON
def icon_path(self): if self.klass.ICON is None: try: import xdg.IconTheme except ImportError: debug(u'Python xdg module was not found. Please install it to read icon files.') else: self.klass.ICON = xdg.IconTheme.getIconPath(self.klass.NAME) return self.klass.ICON
446,048
def get_profile_text(self): body = u'Status: %s' % unicode(self.status) if self.photos: body += u'\nPhotos:' for photo in self.photos: body += u'\n\t\t%s' % unicode(photo) body += u'\nStats:' for label, value in self.get_stats().iteritems(): body += u'\n\t\t%-15s %s' % (label + ':', value) body += u'\n\nInformations:' ...
def get_profile_text(self): body = u'Status: %s' % unicode(self.status) if self.photos: body += u'\nPhotos:' for photo in self.photos: body += u'\n\t\t%s%s' % (unicode(photo['url']), (' (hidden)' if photo['hidden'] else '')) body += u'\nStats:' for label, value in self.get_stats().iteritems(): body += u'\n\t\t%-15s %s'...
446,049
def set_details(self, v): div = self.document.getroot().cssselect('div[id=details]') if not div: return
def set_details(self, v): div = self.document.getroot().cssselect('div[id=details]') if not div: return
446,050
def command_add(self, name, *options): self.weboob.backends_loader.load_all() if name not in [name for name, backend in self.weboob.backends_loader.loaded.iteritems()]: logging.error(u'Backend "%s" does not exist.' % name) return 1
def command_add(self, name, *options): self.weboob.backends_loader.load_all() if name not in [_name for _name, backend in self.weboob.backends_loader.loaded.iteritems()]: logging.error(u'Backend "%s" does not exist.' % name) return 1
446,051
def flush(self): result = u'------------------------------------------%s+----------+----------\n' % (('-' * 15) if not self.interactive else '') result +=u'%s Total %8s %8s' % (('-' * 15) if not self.interactive else '', '%.2f' % self.tot_balance, '%.2f' % self.tot_coming) self.af...
def flush(self): result = u'------------------------------------------%s+----------+----------\n' % (('-' * 15) if not self.interactive else '') result +=u'%s Total %8s %8s' % ((' ' * 15) if not self.interactive else '', '%.2f' % self.tot_balance, '%.2f' % self.tot_coming) self.af...
446,052
def flush(self): result = u'------------------------------------------%s+----------+----------\n' % (('-' * 15) if not self.interactive else '') result +=u'%s Total %8s %8s' % (('-' * 15) if not self.interactive else '', '%.2f' % self.tot_balance, '%.2f' % self.tot_coming) self.af...
def flush(self): result = u'------------------------------------------%s+----------+----------\n' % (('-' * 15) if not self.interactive else '') result +=u'%s Total %8s %8s' % (('-' * 15) if not self.interactive else '', '%.2f' % self.tot_balance, '%.2f' % self.tot_coming) self.af...
446,053
def format_dict(self, item): self.count += 1 if self.interactive: backend = item['id'].split('@', 1)[1] id = '#%d (%s)' % (self.count, backend) else: id = item['id']
def format_dict(self, item): self.count += 1 if self.interactive: backend = item['id'].split('@', 1)[1] id = '#%d (%s)' % (self.count, backend) else: id = item['id']
446,054
def handle_entityref(self, name): self._target.data(unichr(htmlentitydefs.name2codepoint[name]))
def handle_entityref(self, name): self._target.data(unichr(htmlentitydefs.name2codepoint[name]))
446,055
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
446,056
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
def get_history(self, start_index = 0): """ Returns the history of a specific account. Note that this function expects the current page page to be the one dedicated to this history. """ # tested on CA Lorraine, Paris, Toulouse # avoir parsing the page as an account-dedicated page if it is not the case if not self.is_ac...
446,057
def do_current(self, city): """ current CITY
def do_current(self, line): """ current CITY
446,058
def do_current(self, city): """ current CITY
def do_current(self, city): """ current CITY
446,059
def do_forecasts(self, city): """ forecasts CITY
def do_forecasts(self, line): """ forecasts CITY
446,060
def command_profile(self, id): _id, backend_name = self.parse_id(id)
def command_profile(self, id): _id, backend_name = self.parse_id(id)
446,061
def __init__(self): cmd.Cmd.__init__(self) self.prompt = '%s> ' % self.APPNAME self.intro = '\n'.join(('Welcome to %s v%s' % (self.APPNAME, self.VERSION), '', '%s' % self.COPYRIGHT, 'This program is free software; you can redistribute it and/or modify', 'it under the terms of the GNU General Public License as published...
def __init__(self): cmd.Cmd.__init__(self) self.prompt = '%s> ' % self.APPNAME self.intro = '\n'.join(('Welcome to %s v%s' % (self.APPNAME, self.VERSION), '', '%s' % self.COPYRIGHT, 'This program is free software; you can redistribute it and/or modify', 'it under the terms of the GNU General Public License as published...
446,062
def do_help(self, arg=None, return_only=False): if return_only: stringio = StringIO() old_stdout = self.stdout self.stdout = stringio if arg: cmd_names = set(name[3:] for name in self.get_names() if name.startswith('do_')) if arg in cmd_names: command_help = self.get_command_help(arg) if command_help is None: logging.w...
def get_commands_doc(self): names = set(name for name in self.get_names() if name.startswith('do_')) application_cmds_doc = [] weboob_cmds_doc = [] cmds_undoc = [] for name in sorted(names): cmd = name[3:] if cmd in self.hidden_commands.union(['help']): continue elif getattr(self, name).__doc__: short_help = ' %s' %...
446,063
def do_help(self, arg=None, return_only=False): if return_only: stringio = StringIO() old_stdout = self.stdout self.stdout = stringio if arg: cmd_names = set(name[3:] for name in self.get_names() if name.startswith('do_')) if arg in cmd_names: command_help = self.get_command_help(arg) if command_help is None: logging.w...
def do_help(self, arg=None, return_only=False): if return_only: stringio = StringIO() old_stdout = self.stdout self.stdout = stringio if arg: cmd_names = set(name[3:] for name in self.get_names() if name.startswith('do_')) if arg in cmd_names: command_help = self.get_command_help(arg) if command_help is None: logging.w...
446,064
def do_help(self, arg=None, return_only=False): if return_only: stringio = StringIO() old_stdout = self.stdout self.stdout = stringio if arg: cmd_names = set(name[3:] for name in self.get_names() if name.startswith('do_')) if arg in cmd_names: command_help = self.get_command_help(arg) if command_help is None: logging.w...
def do_help(self, arg=None, return_only=False): if return_only: stringio = StringIO() old_stdout = self.stdout self.stdout = stringio if arg: cmd_names = set(name[3:] for name in self.get_names() if name.startswith('do_')) if arg in cmd_names: command_help = self.get_command_help(arg) if command_help is None: logging.w...
446,065
def do_help(self, arg=None, return_only=False): if return_only: stringio = StringIO() old_stdout = self.stdout self.stdout = stringio if arg: cmd_names = set(name[3:] for name in self.get_names() if name.startswith('do_')) if arg in cmd_names: command_help = self.get_command_help(arg) if command_help is None: logging.w...
def do_help(self, arg=None, return_only=False): if return_only: stringio = StringIO() old_stdout = self.stdout self.stdout = stringio if arg: cmd_names = set(name[3:] for name in self.get_names() if name.startswith('do_')) if arg in cmd_names: command_help = self.get_command_help(arg) if command_help is None: logging.w...
446,066
def complete_backends(self, text, line, begidx, endidx): choices = None commands = ['enable', 'disable', 'only', 'list'] available_backends_names = set(backend.name for backend in self.weboob.iter_backends()) enabled_backends_names = set(backend.name for backend in self.enabled_backends)
def complete_backends(self, text, line, begidx, endidx): choices = None commands = ['enable', 'disable', 'only', 'list'] available_backends_names = set(backend.name for backend in self.weboob.iter_backends()) enabled_backends_names = set(backend.name for backend in self.enabled_backends)
446,067
def iter_torrents(self):
def iter_torrents(self):
446,068
def f(x): return x.startswith('command_' + command)
def f(x): return x.startswith('command_' + command)
446,069
def openurl(self, *args, **kwargs): """ Open an URL but do not create a Page object. """ if_fail = kwargs.pop('if_fail', 'raise') debug('Opening URL "%s", %s' % (args, kwargs)) try: return mechanize.Browser.open_novisit(self, *args, **kwargs) except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError)...
def openurl(self, *args, **kwargs): """ Open an URL but do not create a Page object. """ if_fail = kwargs.pop('if_fail', 'raise') debug('Opening URL "%s", %s' % (args, kwargs)) try: return mechanize.Browser.open_novisit(self, *args, **kwargs) except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError,...
446,070
def submit(self, *args, **kwargs): """ Submit the selected form. """ try: self._change_location(mechanize.Browser.submit(self, *args, **kwargs)) except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError), e: self.page = None raise BrowserHTTPError(e) except (mechanize.BrowserStateError, BrowserRetry)...
def submit(self, *args, **kwargs): """ Submit the selected form. """ try: self._change_location(mechanize.Browser.submit(self, *args, **kwargs)) except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError, BadStatusLine), e: self.page = None raise BrowserHTTPError(e) except (mechanize.BrowserStateError...
446,071
def follow_link(self, *args, **kwargs): try: self._change_location(mechanize.Browser.follow_link(self, *args, **kwargs)) except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError), e: self.page = None raise BrowserHTTPError('%s (url="%s")' % (e, args and args[0] or 'None')) except (mechanize.BrowserS...
def follow_link(self, *args, **kwargs): try: self._change_location(mechanize.Browser.follow_link(self, *args, **kwargs)) except (mechanize.response_seek_wrapper, urllib2.HTTPError, urllib2.URLError, BadStatusLine), e: self.page = None raise BrowserHTTPError('%s (url="%s")' % (e, args and args[0] or 'None')) except (mec...
446,072
def location(self, *args, **kwargs): """ Change location of browser on an URL.
def location(self, *args, **kwargs): """ Change location of browser on an URL.
446,073
def _complete_iter(self, backend, count, fields, res): for i, sub in enumerate(res): if count and i == count: break sub = self._complete_obj(backend, sub, fields) yield sub
def _complete_iter(self, backend, count, fields, res): for i, sub in enumerate(res): if count and i == count: break sub = self._complete_obj(backend, fields, sub) yield sub
446,074
def unit(self, n, u): m = {'KB': 1024, 'MB': 1024*1024, 'GB': 1024*1024*1024, 'TB': 1024*1024*1024*1024, } #return float(n.replace(',', '')) * m.get(u, 1) return float(n*m[u])
def unit(self, n, u): m = {'B': 1, 'KB': 1024, 'MB': 1024*1024, 'GB': 1024*1024*1024, 'TB': 1024*1024*1024*1024, } #return float(n.replace(',', '')) * m.get(u, 1) return float(n*m[u])
446,075
def iter_torrents(self):
def iter_torrents(self):
446,076
def do_list(self, line): """ list
def do_list(self, line): """ list
446,077
def do_backends(self, line): """ backends [CAPS ...]
def do_backends(self, line): """ backends [CAPS ...]
446,078
def __init__(self, thread_id, id, title, sender, date=None, reply_id=''): self.thread_id = unicode(thread_id) self.id = unicode(id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender)
def __init__(self, thread_id, _id, title, sender, date=None, reply_id=u'', content=u'', signature=u''): self.thread_id = unicode(thread_id) self.id = unicode(id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender)
446,079
def __init__(self, thread_id, id, title, sender, date=None, reply_id=''): self.thread_id = unicode(thread_id) self.id = unicode(id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender)
def __init__(self, thread_id, id, title, sender, date=None, reply_id=''): self.thread_id = unicode(thread_id) self._id = unicode(_id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender)
446,080
def __init__(self, thread_id, id, title, sender, date=None, reply_id=''): self.thread_id = unicode(thread_id) self.id = unicode(id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender)
def __init__(self, thread_id, id, title, sender, date=None, reply_id=''): self.thread_id = unicode(thread_id) self.id = unicode(id) self.reply_id = unicode(reply_id) self.title = unicode(title) self.sender = unicode(sender)
446,081
def getFullID(self): return '%s.%s' % (self.id, self.thread_id)
def getFullID(self): return '%s.%s' % (self.id, self.thread_id)
446,082
def getID(self): return self.id
def getID(self): return self.id
446,083
def main(self, argv): self.load_backends(ICapTravel) return self.process_command(*argv[1:])
def main(self, argv): return self.process_command(*argv[1:])
446,084
def onecmd(self, line): """ This REPL method is overrided to catch some particular exceptions. """ cmd, arg, ignored = self.parseline(line)
def onecmd(self, line): """ This REPL method is overrided to catch some particular exceptions. """ cmd, arg, ignored = self.parseline(line)
446,085
def set_formatter(self, name): """ Set the current formatter from name.
def set_formatter(self, name): """ Set the current formatter from name.
446,086
def command_post(self): msg = message_from_file(sys.stdin) reply_to = msg.get('In-Reply-To') if not reply_to: print >>sys.stderr, 'This is not a reply (no Reply-To field)' return 1
def command_post(self): msg = message_from_file(sys.stdin) reply_to = msg.get('In-Reply-To') if not reply_to: print >>sys.stderr, 'This is not a reply (no Reply-To field)' return 1
446,087
def __init__(self): Browser.__init__(self, '', parser=Parser)
def __init__(self): Browser.__init__(self, '', parser=Parser)
446,088
def __init__(self, weboob, contact, parent=None): QWidget.__init__(self, parent) self.ui = Ui_Profile() self.ui.setupUi(self)
def __init__(self, weboob, contact, parent=None): QWidget.__init__(self, parent) self.ui = Ui_Profile() self.ui.setupUi(self)
446,089
def __init__(self, weboob, contact, parent=None): QWidget.__init__(self, parent) self.ui = Ui_Profile() self.ui.setupUi(self)
def __init__(self, weboob, contact, parent=None): QWidget.__init__(self, parent) self.ui = Ui_Profile() self.ui.setupUi(self)
446,090
def gotProfile(self, backend, contact): if not backend: return
def gotProfile(self, backend, contact): if not backend: return
446,091
def gotProfile(self, backend, contact): if not backend: return
def gotProfile(self, backend, contact): if not backend: return
446,092
def gotProfile(self, backend, contact): if not backend: return
def gotProfile(self, backend, contact): if not backend: return
446,093
def gotProfile(self, backend, contact): if not backend: return
def gotProfile(self, backend, contact): if not backend: return
446,094
def contactChanged(self, current): if not current: return
defself.setContact(contact) def setContact(self, contact): contactChanged(self,self.setContact(contact) def setContact(self, contact): current):self.setContact(contact) def setContact(self, contact): ifself.setContact(contact) def setContact(self, contact): notself.setContact(contact) def setContact(self, contact)...
446,095
def iter_contacts(self, status=Contact.STATUS_ALL): with self.browser: for contact in self.browser.iter_contacts(): if contact['cat'] == 1: s = Contact.STATUS_ONLINE elif contact['cat'] == 3: s = Contact.STATUS_OFFLINE else: warning('Unknown AuM contact status: %s' % contact['cat'])
def iter_contacts(self, status=Contact.STATUS_ALL): with self.browser: for contact in self.browser.iter_contacts(): if contact['cat'] == 1: s = Contact.STATUS_ONLINE elif contact['cat'] == 3: s = Contact.STATUS_OFFLINE else: warning('Unknown AuM contact status: %s' % contact['cat'])
446,096
def on_loaded(self): self.items = []
def on_loaded(self): self.items = []
446,097
def get_full_id(self): return '%s.%s' % (self.id, self.thread_id)
def get_full_id(self): return '%s.%s' % (self.id, self.thread_id)
446,098
def get_full_reply_id(self): return '%s.%s' % (self.reply_id, self.thread_id)
def get_full_reply_id(self): return '%s.%s' % (self.reply_id, self.thread_id)
446,099