Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep work for adding a mopidy config --set ... type command. #548

Merged
merged 2 commits into from
Oct 27, 2013

Commits on Oct 27, 2013

  1. config: Add preprocessor for preserving comments when editing configs.

    Adds markers to configs files that ensures configparser won't mangle comments
    in the files. Will be combined with a postprocessor that undoes these changes.
    adamcik committed Oct 27, 2013
    Configuration menu
    Copy the full SHA
    d5cb428 View commit details
    Browse the repository at this point in the history
  2. config: Add postprocessor for converting config back.

    Idea forward from here is that once we have a config sub command that we expose
    a setting config values which will:
    
    1. Run the preprocessor on the file to edit.
    2. Load it into config parser.
    3. Modify the value.
    4. Write it to a io.ByteString
    5. Run the postprocessor
    6. Save the file with comments etc intact.
    adamcik committed Oct 27, 2013
    Configuration menu
    Copy the full SHA
    73f9171 View commit details
    Browse the repository at this point in the history