diff options
| author | 2018-10-04 15:22:09 +0100 | |
|---|---|---|
| committer | 2018-10-04 15:22:09 +0100 | |
| commit | 8d3255c46d75f0cda7791a5a9904a5c38207e35d (patch) | |
| tree | 2a25ab13aaa5be50890085842cd1088de0602e72 /src/utils/__init__.py | |
| parent | Try calling module.unload() (if it exists) when unloading a module (diff) | |
| signature | ||
Simplify hashflag parsing
Diffstat (limited to 'src/utils/__init__.py')
| -rw-r--r-- | src/utils/__init__.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/utils/__init__.py b/src/utils/__init__.py index dccc1faf..57980e58 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -136,12 +136,7 @@ def get_hashflags(filename): if not line.startswith("#"): break elif line.startswith("#--"): - line_split = line.split(" ", 1) - hashflag = line_split[0][3:] - value = None - - if len(line_split) > 1: - value = line_split[1] + hashflag, _, value = line.replace("#--", "", 1).partition(" ") hashflags[hashflag] = value return hashflags.items() |
