From 8d3255c46d75f0cda7791a5a9904a5c38207e35d Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 4 Oct 2018 15:22:09 +0100 Subject: Simplify hashflag parsing --- src/utils/__init__.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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() -- cgit v1.3.1-10-gc9f91