diff options
author | Devan Franchini <twitch153@gentoo.org> | 2014-06-01 18:23:50 -0400 |
---|---|---|
committer | Devan Franchini <twitch153@gentoo.org> | 2014-06-12 17:11:50 -0400 |
commit | f8132d4a8c8bf44ed90bef88c35eb9565e6a4a4d (patch) | |
tree | cba92cad5453fca52887c1d9460594d825808540 /layman/config.py | |
parent | api.py: fixes byte string output for update_news() (diff) | |
download | layman-f8132d4a8c8bf44ed90bef88c35eb9565e6a4a4d.tar.gz layman-f8132d4a8c8bf44ed90bef88c35eb9565e6a4a4d.tar.bz2 layman-f8132d4a8c8bf44ed90bef88c35eb9565e6a4a4d.zip |
config.py: moves EPREFIX constant to top of file
Diffstat (limited to 'layman/config.py')
-rw-r--r-- | layman/config.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/layman/config.py b/layman/config.py index 9d2bc7f..31dc0ac 100644 --- a/layman/config.py +++ b/layman/config.py @@ -27,7 +27,6 @@ from __future__ import unicode_literals __version__ = "0.2" - import sys import os @@ -41,6 +40,13 @@ except: from layman.output import Message from layman.utils import path +# establish the eprefix, initially set so eprefixify can +# set it on install +EPREFIX = "@GENTOO_PORTAGE_EPREFIX@" +# check and set it if it wasn't +if "GENTOO_PORTAGE_EPREFIX" in EPREFIX: + EPREFIX = '' + def read_layman_config(config=None, defaults=None, output=None): """reads the config file defined in defaults['config'] and updates the config @@ -66,14 +72,6 @@ def read_layman_config(config=None, defaults=None, output=None): overlays.update(["file://" + _path]) config.set('MAIN', 'overlays', '\n'.join(overlays)) -# establish the eprefix, initially set so eprefixify can -# set it on install -EPREFIX = "@GENTOO_PORTAGE_EPREFIX@" - -# check and set it if it wasn't -if "GENTOO_PORTAGE_EPREFIX" in EPREFIX: - EPREFIX = '' - class BareConfig(object): '''Handles the configuration only.''' |