forked from turnkeylinux/tklbam
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmd_internal.py
More file actions
executable file
·35 lines (28 loc) · 898 Bytes
/
cmd_internal.py
File metadata and controls
executable file
·35 lines (28 loc) · 898 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/python2
#
# Copyright (c) 2010-2012 Liraz Siri <liraz@turnkeylinux.org>
#
# This file is part of TKLBAM (TurnKey GNU/Linux BAckup and Migration).
#
# TKLBAM is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of
# the License, or (at your option) any later version.
#
"""
Execute an internal command
"""
import os
from os.path import realpath
from cliwrapper import CliWrapper
import cmd_internals
from executil import fmt_command
class CliWrapper(CliWrapper):
DESCRIPTION = __doc__
PATH = cmd_internals.__path__
main = CliWrapper.main
def fmt_internal_command(command, *args):
internal_command = [ realpath(__file__), command ] + list(args)
return fmt_command("python2", *internal_command)
if __name__ == "__main__":
CliWrapper.main()