summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2010-05-11 19:10:55 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2010-05-11 19:10:55 +0200
commit7091123e002a911873a9e161173c48694b0a0499 (patch)
tree4f5dace895b66417170e489e92544accaec4d1e4
parent3816f2cfdfdb8a4f0dbb90a8c5b554f0b3a7e463 (diff)
downloadportato-7091123e002a911873a9e161173c48694b0a0499.tar.gz
portato-7091123e002a911873a9e161173c48694b0a0499.tar.bz2
portato-7091123e002a911873a9e161173c48694b0a0499.zip
Add '--plugin-dir' option
Diffstat (limited to '')
-rw-r--r--portato/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/portato/__init__.py b/portato/__init__.py
index 61d6a42..12b8fe4 100644
--- a/portato/__init__.py
+++ b/portato/__init__.py
@@ -17,7 +17,7 @@ import sys, os
from optparse import OptionParser, SUPPRESS_HELP
from .log import start as logstart
-from .constants import LOCALE_DIR, APP, VERSION, REVISION
+from .constants import LOCALE_DIR, APP, VERSION, REVISION, PLUGIN_DIR
from .helper import debug, info, error
# set better version info
@@ -53,6 +53,9 @@ def get_parser (use_ = False):
parser.add_option("-F", "--no-fork", action = "store_true", dest = "nofork", default = False,
help = _("do not fork off as root"))
+ parser.add_option("--plugin-dir", action = "store_true", dest = "pdir", default = False,
+ help = _("print the directory the plugins are located in"))
+
return parser
def _sub_start ():
@@ -71,6 +74,11 @@ def start():
# run parser
(options, args) = get_parser().parse_args()
+ # plugin dir
+ if options.pdir:
+ print PLUGIN_DIR
+ return
+
if options.nofork or os.getuid() == 0: # start GUI
# close listener at exit