improve error handling for this kind of situation like __line type #25
Labels
No Label
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: ungleich-public/cdist#25
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
this is a mix about I don't know what I am doing, but I am learning, and what I get is confusing and frustrating (UX). Why I do strange
__line
things? Well, I got inspired by the official examples. Reading them you think, why not using whitespaces (and other characters) between that wordsIf I do:
I get a strange error (no matter how much
-vvvv
I use, it continues to be strange:this way works, hence, I am suppose that this
quit_password_authentication_remove
is the custom name of the object id (particular instance of the __line type), I would like to see an error like "object id cannot include whitespaces, ... (or what are the characters that can be included)?"in unix, spaces are evil
@ander Do you know where these restrictions originate from?
One case I can think of would be the
require
environment variable, but this could easily solved by using shlex.split, IMO.__object_id
must not contain spaces. it should match[a-z0-9_-]+
afaik.I've tried a bit in
cdist/exec/remote.py
for the methodrun()
by quoting all parameter, but it will fail for globing. If this should be handled, escaping spaces and parenthesis can be better. Or only problematic arguments will be quoted.The bigger problem will be to detect which must be escaped/quoted and which not. Because the glob (
chmod 0700 /var/lib/cdist/conf/explorer/*
) is wanted. Maybe start escaping in an earlier stage of the path creation?Looks rather like an escaping problem. It happens not only for the
__line
type and looks similar to yours:I think it's a general problem not connected to the
__line
type. The funny thing is that there is a different point of failing with or without parenthesis.