File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 33from __future__ import unicode_literals
44
55import argparse
6+ import os
67import sys
78
89from .config import Configuration
@@ -19,15 +20,13 @@ def main(args=None):
1920 parser .add_argument (
2021 "--config" ,
2122 "-c" ,
22- nargs = 1 ,
2323 type = str ,
2424 dest = "config" ,
2525 help = "Path to the sanitizer configuration file." ,
2626 )
2727 parser .add_argument (
2828 "--output" ,
2929 "-o" ,
30- nargs = 1 ,
3130 type = str ,
3231 dest = "output" ,
3332 help = (
@@ -45,9 +44,11 @@ def main(args=None):
4544 config = None
4645
4746 if args .config :
48- config = Configuration .from_file (args .config [0 ])
47+ conf_dir = os .path .realpath (os .path .dirname (args .config ))
48+ sys .path .insert (0 , conf_dir )
49+ config = Configuration .from_file (args .config )
4950 if args .output :
50- output = open (args .output [ 0 ] , "w" )
51+ output = open (args .output , "w" )
5152
5253 try :
5354 run (
You can’t perform that action at this time.
0 commit comments