mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
nvchecker-notify: add the keyfile flag
This commit is contained in:
parent
42dfd483c7
commit
8a988ba3a3
1 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,9 @@ def get_args():
|
||||||
parser.add_argument('-c', '--file',
|
parser.add_argument('-c', '--file',
|
||||||
metavar='FILE', type=str,
|
metavar='FILE', type=str,
|
||||||
help='software version configuration file if not default')
|
help='software version configuration file if not default')
|
||||||
|
parser.add_argument('-k', '--keyfile',
|
||||||
|
metavar='FILE', type=str,
|
||||||
|
help='use specified keyfile (override the one in configuration file)')
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
@ -35,6 +38,8 @@ def main():
|
||||||
]
|
]
|
||||||
if args.file:
|
if args.file:
|
||||||
cmd.extend(['-c', args.file])
|
cmd.extend(['-c', args.file])
|
||||||
|
if args.keyfile:
|
||||||
|
cmd.extend(['-k', args.keyfile])
|
||||||
|
|
||||||
process = subprocess.Popen(cmd, pass_fds=(wfd,))
|
process = subprocess.Popen(cmd, pass_fds=(wfd,))
|
||||||
os.close(wfd)
|
os.close(wfd)
|
||||||
|
|
Loading…
Add table
Reference in a new issue