]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Tidying up argv mangling
authorMenno Smits <menno@freshfoo.com>
Thu, 13 Jan 2011 14:40:02 +0000 (14:40 +0000)
committerMenno Smits <menno@freshfoo.com>
Thu, 13 Jan 2011 14:40:02 +0000 (14:40 +0000)
livetest.py

index 0ceb52e787c1cc501a622cec179d0746347c30ca..1e373a48ac14d3d250696c93d51b4605a5ebbed0 100755 (executable)
@@ -442,11 +442,10 @@ def parse_argv():
     args = sys.argv[1:]
     if not args:
         argv_error('Please specify a host configuration file. See livetest-sample.ini for an example.')
-    ini_path = sys.argv[1]
+    ini_path = sys.argv.pop(1)  # 2nd arg should be the INI file
     if not os.path.isfile(ini_path):
         argv_error('%r is not a livetest INI file' % ini_path)
     host_config = parse_config_file(ini_path)
-    sys.argv = sys.argv[:1] + sys.argv[2:]
     return host_config
 
 def main():