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

/etc/default/necco のパスを変更可能にする #6

Closed
dodo5522 opened this issue Jun 21, 2017 · 2 comments
Closed

/etc/default/necco のパスを変更可能にする #6

dodo5522 opened this issue Jun 21, 2017 · 2 comments

Comments

@dodo5522
Copy link
Owner

dodo5522 commented Jun 21, 2017

例えばxserverではroot権限がないので/etcが参照できない。

ServerConfigurationクラスにはパス指定できるインタフェースがあるが、外部からこれを指定可能なオプションがない。

class ServerConfiguration(object):
    _DEFAULTS = { 
        "GENERAL": {
            "TITLE": "Title",
            "DOCROOT": "/var/tmp/necco",
            "SECRET_KEY": "necco_temporary_key",
        },  
        "MYSQL": {
            "DB": "necco",
            "PORT": "3306",
            "SERVER": "localhost",
            "USER": "guest",
            "PASSWORD": "guest's password",
        },  
    }   

    def __init__(self, file_path="/etc/necco/necco.ini"):
        """ Set configuration based on the specified file.

        returns:
            Default configuration data dict.
        raises:
            PermissionError: If configuration file cannot be written on the specified path.
        """
@dodo5522 dodo5522 self-assigned this Jun 21, 2017
@dodo5522
Copy link
Owner Author

あれ? /etc/necco/necco.ini だっけか?

@dodo5522
Copy link
Owner Author

#10 とかぶる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant