Use basestring instead of str and unicode
This commit is contained in:
parent
024f217c8b
commit
e5d4047016
4 changed files with 4 additions and 4 deletions
|
|
@ -104,7 +104,7 @@ class BNPorc(BaseBrowser):
|
||||||
return self.page.get_list()
|
return self.page.get_list()
|
||||||
|
|
||||||
def get_account(self, id):
|
def get_account(self, id):
|
||||||
assert isinstance(id, (str, unicode))
|
assert isinstance(id, basestring)
|
||||||
|
|
||||||
if not self.is_on_page(pages.AccountsList):
|
if not self.is_on_page(pages.AccountsList):
|
||||||
self.location('/NSFR?Action=DSP_VGLOBALE')
|
self.location('/NSFR?Action=DSP_VGLOBALE')
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ class Cragr(BaseBrowser):
|
||||||
return self.page.get_list()
|
return self.page.get_list()
|
||||||
|
|
||||||
def get_account(self, id):
|
def get_account(self, id):
|
||||||
assert isinstance(id, (str, unicode))
|
assert isinstance(id, basestring)
|
||||||
|
|
||||||
l = self.get_accounts_list()
|
l = self.get_accounts_list()
|
||||||
for a in l:
|
for a in l:
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ class LCLBrowser(BaseBrowser):
|
||||||
return self.page.get_list()
|
return self.page.get_list()
|
||||||
|
|
||||||
def get_account(self, id):
|
def get_account(self, id):
|
||||||
assert isinstance(id, (str, unicode))
|
assert isinstance(id, basestring)
|
||||||
|
|
||||||
l = self.get_accounts_list()
|
l = self.get_accounts_list()
|
||||||
for a in l:
|
for a in l:
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ class INIConfig(IConfig):
|
||||||
def save(self):
|
def save(self):
|
||||||
def save_section(values, root_section=None):
|
def save_section(values, root_section=None):
|
||||||
for k, v in values.iteritems():
|
for k, v in values.iteritems():
|
||||||
if isinstance(v, (int, float, str, unicode)):
|
if isinstance(v, (int, float, basestring)):
|
||||||
if root_section is not None and not self.config.has_section(root_section):
|
if root_section is not None and not self.config.has_section(root_section):
|
||||||
self.config.add_section(root_section)
|
self.config.add_section(root_section)
|
||||||
self.config.set(root_section, k, unicode(v))
|
self.config.set(root_section, k, unicode(v))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue