Moved privilegedactions to the actions directory.

This commit is contained in:
Nick Daly committed 2013-10-27 10:26:06 -05:00
1 parent 025c2aebc1
commit 4d529b7585
4 files changed
+9 -8

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import sys
import subprocess
import cfg
def privilegedaction_run(action, options):
cmd = ['sudo', '-n', "/usr/share/plinth/actions/%s" % action]
if options:
cmd.extend(options)
cfg.log.info('running: %s ' % ' '.join(cmd))
output, error = \
subprocess.Popen(cmd,
stdout = subprocess.PIPE,
stderr= subprocess.PIPE).communicate()
return output, error