diff options
author | rsiddharth <s@ricketyspace.net> | 2016-11-13 18:33:03 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2016-11-13 18:33:03 +0000 |
commit | fca51ac7858705dbf11b3900d40b40bbe7145aba (patch) | |
tree | d2525f6df845ae186cb7cc1250498ed9fb106b84 /gd_diff.py | |
parent | 0b80b898c84b8747fe8b8ac7b485b06f7cd1e22e (diff) |
Add `configure` function.
* gd_diff.py (configure): New function.
* tests/test_gd_diff.py (test_configure): Test for `configure` function.
Diffstat (limited to 'gd_diff.py')
-rw-r--r-- | gd_diff.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -313,3 +313,15 @@ def configured_p(): return True else: return False + + +def configure(): + """Configure gns-deb-diff. + """ + # prompt username and password. + config = {} + config['user'] = input('gNewSense wiki username: ') + config['pass'] = input('gNewSense wiki password: ') + + json.dump(config, open(config_file(), 'w')) + os.chmod(config_file(), mode=0o600) |