mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
Replace basestring with str
This commit is contained in:
parent
75419c1f04
commit
832b1224b9
2 changed files with 5 additions and 5 deletions
|
@ -247,9 +247,9 @@ def read_config(opts, config_file='config.py'):
|
|||
config[k] = clean_description(config[k])
|
||||
|
||||
if 'serverwebroot' in config:
|
||||
if isinstance(config['serverwebroot'], basestring):
|
||||
if isinstance(config['serverwebroot'], str):
|
||||
roots = [config['serverwebroot']]
|
||||
elif all(isinstance(item, basestring) for item in config['serverwebroot']):
|
||||
elif all(isinstance(item, str) for item in config['serverwebroot']):
|
||||
roots = config['serverwebroot']
|
||||
else:
|
||||
raise TypeError('only accepts strings, lists, and tuples')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue