diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2019-10-20 18:55:57 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2019-10-20 18:55:57 +0200 |
commit | de71c01cd5c6dca3b33201a9effafc6c422fa239 (patch) | |
tree | fb8cfa1b50c58c641610e0413b1a77d70072dfe5 /music_sampler | |
parent | b3951077630d9f8188fe15fca899f75be41ff4fe (diff) | |
download | MusicSampler-de71c01cd5c6dca3b33201a9effafc6c422fa239.tar.gz MusicSampler-de71c01cd5c6dca3b33201a9effafc6c422fa239.tar.zst MusicSampler-de71c01cd5c6dca3b33201a9effafc6c422fa239.zip |
Add comment action1.5.0
Diffstat (limited to 'music_sampler')
-rw-r--r-- | music_sampler/actions/__init__.py | 1 | ||||
-rw-r--r-- | music_sampler/actions/comment.py | 5 | ||||
-rw-r--r-- | music_sampler/helpers.py | 2 | ||||
-rw-r--r-- | music_sampler/mapping.py | 2 | ||||
-rw-r--r-- | music_sampler/sysfont.py | 2 |
5 files changed, 9 insertions, 3 deletions
diff --git a/music_sampler/actions/__init__.py b/music_sampler/actions/__init__.py index e0671fe..2f4cc54 100644 --- a/music_sampler/actions/__init__.py +++ b/music_sampler/actions/__init__.py | |||
@@ -1,3 +1,4 @@ | |||
1 | from . import comment | ||
1 | from . import interrupt_wait | 2 | from . import interrupt_wait |
2 | from . import load_music | 3 | from . import load_music |
3 | from . import pause | 4 | from . import pause |
diff --git a/music_sampler/actions/comment.py b/music_sampler/actions/comment.py new file mode 100644 index 0000000..c7baa82 --- /dev/null +++ b/music_sampler/actions/comment.py | |||
@@ -0,0 +1,5 @@ | |||
1 | def run(action, music=None, **kwargs): | ||
2 | pass | ||
3 | |||
4 | def description(action, message, **kwargs): | ||
5 | return message | ||
diff --git a/music_sampler/helpers.py b/music_sampler/helpers.py index fbd338b..9eb1a95 100644 --- a/music_sampler/helpers.py +++ b/music_sampler/helpers.py | |||
@@ -232,7 +232,7 @@ def dump_config(): | |||
232 | item, max_size, getattr(Config, item))) | 232 | item, max_size, getattr(Config, item))) |
233 | 233 | ||
234 | def build_config(args): | 234 | def build_config(args): |
235 | stream = open(Config.yml_file, "r") | 235 | stream = open(Config.yml_file, "r", encoding='utf8') |
236 | try: | 236 | try: |
237 | config = yaml.safe_load(stream) | 237 | config = yaml.safe_load(stream) |
238 | except Exception as e: | 238 | except Exception as e: |
diff --git a/music_sampler/mapping.py b/music_sampler/mapping.py index 193f5e5..fc9768b 100644 --- a/music_sampler/mapping.py +++ b/music_sampler/mapping.py | |||
@@ -391,7 +391,7 @@ class Mapping(RelativeLayout): | |||
391 | "a float, ignored".format(filename)) | 391 | "a float, ignored".format(filename)) |
392 | return music_property | 392 | return music_property |
393 | 393 | ||
394 | stream = open(Config.yml_file, "r") | 394 | stream = open(Config.yml_file, "r", encoding='utf8') |
395 | try: | 395 | try: |
396 | config = yaml.safe_load(stream) | 396 | config = yaml.safe_load(stream) |
397 | except Exception as e: | 397 | except Exception as e: |
diff --git a/music_sampler/sysfont.py b/music_sampler/sysfont.py index f47693e..7bb518e 100644 --- a/music_sampler/sysfont.py +++ b/music_sampler/sysfont.py | |||
@@ -115,7 +115,7 @@ def _cache_fonts_fontconfig(): | |||
115 | 115 | ||
116 | # get the font name | 116 | # get the font name |
117 | name = None | 117 | name = None |
118 | if len(values) > 3: | 118 | if len(values) > 4: |
119 | fullnames, fullnamelangs = values[3:] | 119 | fullnames, fullnamelangs = values[3:] |
120 | langs = fullnamelangs.split(",") | 120 | langs = fullnamelangs.split(",") |
121 | try: | 121 | try: |