aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/g-octave')
-rwxr-xr-xscripts/g-octave27
1 files changed, 12 insertions, 15 deletions
diff --git a/scripts/g-octave b/scripts/g-octave
index 008b5f9..81703f6 100755
--- a/scripts/g-octave
+++ b/scripts/g-octave
@@ -11,6 +11,8 @@
:license: GPL-2, see LICENSE for more details.
"""
+has_fetch = True
+
__issue_tracker = 'http://g-octave.rafaelmartins.eng.br/report'
import sys
@@ -147,15 +149,17 @@ def main():
portage.output.nocolor()
from g_octave.config import Config
-
- has_fetch = True
- try:
- from g_octave.fetch import need_update, check_updates, download_files, check_db_cache
- except ImportError:
- has_fetch = False
+ from g_octave.fetch import need_update, check_updates, download_files, check_db_cache
conf_prefetch = Config(True)
+ if options.config:
+ try:
+ print conf_prefetch.__getattr__(args[0])
+ except:
+ return os.EX_DATAERR
+ return os.EX_OK
+
# checking if our overlay is correctly added to PORTDIR_OVERLAY
if conf_prefetch.overlay not in portage.settings['PORTDIR_OVERLAY'].split(' '):
out.eerror('g-octave overlay is not configured!')
@@ -186,16 +190,9 @@ def main():
return os.EX_OK
- check_db_cache()
-
- conf = Config()
+ check_db_cache()
- if options.config:
- try:
- print conf.__getattr__(args[0])
- except:
- return os.EX_DATAERR
- return os.EX_OK
+ conf = Config()
from g_octave.description import Description
from g_octave.description_tree import DescriptionTree