root/trunk/config.py

Revision 22, 0.5 KB (checked in by lasarux, 3 years ago)
  • config.py:
  • config.yaml:
  • misc/utils.py:
  • plugins/info/info/init.py:
  • plugins/zfs/zfs/init.py:
  • plugins/zfs/zfs/zfs.glade: More changes in config stuff. ZFS plugin uses the current connection.
Line 
1# -*- coding: utf-8 -*-
2from misc import yaml
3
4GLADEDIR = "glade"
5CONFIG = yaml.load(file("config.yaml").read())
6HOSTS = CONFIG["hosts"]
7USERS = CONFIG["users"]
8PLUGINS = CONFIG["plugins"]
9COMMANDS = CONFIG["commands"]
10#USER = "lasarux" #TODO: add login window
11REMOTE = "TERM=unix LC_ALL=C"
12
13def get_command(command, os):
14    columns = COMMANDS[command]["columns"]
15    try:
16        args = COMMANDS[command][os]
17    except:
18        args = COMMANDS[command]["default"]
19    return "%s %s" % (command, args), columns
Note: See TracBrowser for help on using the browser.