diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-09-22 19:32:18 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-09-22 22:02:51 +0200 |
| commit | 523507835ed6789a9489120023b539f6ae82eb18 (patch) | |
| tree | 84a479a7ab6324f651d406226aef72afca89f7c9 /miasm/os_dep/common.py | |
| parent | 1902c27e796277ab495afe3d39bf17d882eda062 (diff) | |
| download | focaccia-miasm-523507835ed6789a9489120023b539f6ae82eb18.tar.gz focaccia-miasm-523507835ed6789a9489120023b539f6ae82eb18.zip | |
Fix get_str_ansi: return str
get_str_ansi and get_str_unic now returns both *str* object: As get_str_unic decodes the string, get_str_ansi should do the same.
Diffstat (limited to 'miasm/os_dep/common.py')
| -rw-r--r-- | miasm/os_dep/common.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/miasm/os_dep/common.py b/miasm/os_dep/common.py index 87602b3c..0b4d7e11 100644 --- a/miasm/os_dep/common.py +++ b/miasm/os_dep/common.py @@ -130,16 +130,10 @@ def unix_to_sbpath(path): def get_fmt_args(fmt, cur_arg, get_str, get_arg_n): idx = 0 fmt = get_str(fmt) - if isinstance(fmt, bytes): - chars_format = b'%cdfsuxX' - char_percent = b'%' - char_string = b's' - output = b"" - else: - chars_format = u'%cdfsuxX' - char_percent = u'%' - char_string = u's' - output = u"" + chars_format = '%cdfsuxX' + char_percent = '%' + char_string = 's' + output = "" while True: if idx == len(fmt): |