1
0
mirror of https://github.com/gryf/mc_adbfs.git synced 2026-03-26 21:43:30 +01:00

8 Commits

Author SHA1 Message Date
b1a6219d21 Removed deprecated encoding argument from json.loads. 2020-12-07 19:08:29 +01:00
d16f0f06b8 Merge branch 'thp-various-fixes' 2020-06-09 19:55:21 +02:00
c2f07f5516 Merge branch 'various-fixes' of https://github.com/thp/mc_adbfs into thp-various-fixes 2020-06-09 19:55:06 +02:00
e9b196eaf8 Change SafeConfigParser to ConfigParser 2020-05-21 10:10:43 +02:00
039c078a35 Fix missing attribute on conf object 2020-04-26 13:48:21 +02:00
Thomas Perl
b088c45d3f Fix quoting for 'adb shell' 2019-05-09 11:58:29 +02:00
Thomas Perl
c5559f7d41 Python 3's ConfigParser is already the safe one 2019-05-09 11:38:21 +02:00
Thomas Perl
9ffa1a13af Default to Python 3 2019-05-09 11:38:00 +02:00
2 changed files with 4 additions and 2 deletions

View File

@@ -76,6 +76,7 @@ You can configure behaviour of this plugin using ``.ini`` file located under
root =
adb_command = adb
adb_connect =
try_su = false
where:

5
adbfs
View File

@@ -80,6 +80,7 @@ class Conf(object):
self.suppress_colors = False
self.adb_command = 'adb'
self.adb_connect = ''
self.try_su = False
self.read()
self.connect()
@@ -187,7 +188,7 @@ class Conf(object):
if not os.path.exists(conf_fname):
return
cfg = configparser.SafeConfigParser()
cfg = configparser.ConfigParser()
cfg_map = {'debug': (cfg.getboolean, 'debug'),
'dirs_to_skip': (cfg.get, 'dirs_to_skip'),
'suppress_colors': (cfg.get, 'suppress_colors'),
@@ -204,7 +205,7 @@ class Conf(object):
pass
if self.dirs_to_skip and isinstance(self.dirs_to_skip, str):
self.dirs_to_skip = json.loads(self.dirs_to_skip, encoding='ascii')
self.dirs_to_skip = json.loads(self.dirs_to_skip)
self.dirs_to_skip = [x.encode('utf-8') for x in self.dirs_to_skip]
else:
self.dirs_to_skip = []