diff options
author | Guido Günther <agx@sigxcpu.org> | 2018-01-20 12:53:29 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-01-20 12:53:29 +0100 |
commit | da84b6017016da070e1eb2a40f630ed689604245 (patch) | |
tree | 8387faab0bc1e8a47912309de3aa7f82cf859f17 | |
parent | c3e1beba64b30f2db9c08bc47d291fac4a028ae1 (diff) |
config: strip '.py' suffix from commands
This makes sure we parse config sections correctly even when running out
of the source tree like:
PYTHONPATH=. python3 "gbp/scripts/dch.py"
-rw-r--r-- | gbp/config.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gbp/config.py b/gbp/config.py index d63754ea..08293d34 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -559,7 +559,7 @@ class GbpOptionParser(OptionParser): to parse @type sections: C{list} of C{str} """ - self.command = command + self.command = command[:-3] if command.endswith('.py') else command self.sections = sections self.prefix = prefix self.config = {} |