Wednesday, 19 January 2011

Checking command-line arguments...

A problem people have been reporting for a while is that xia2 does not fail loudly when you tell it nonsense. Well, I have now added something which does:

gw56@ws050 nonsense]$ xia2 -3d -nonsense /data/gw56/dl/Cowan/Insulin/insulin/
Traceback (most recent call last):
  File "/home/gw56/svn/xia2/Applications/", line 45, in 
    from xia2setup import write_xinfo
  File "/home/gw56/svn/xia2/Applications/", line 35, in 
    from Handlers.CommandLine import CommandLine
  File "/home/gw56/svn/xia2/Handlers/", line 1513, in 
  File "/home/gw56/svn/xia2/Handlers/", line 349, in setup
    raise RuntimeError, nonsense
RuntimeError: Unknown command-line options: -nonsense

however this will only spot nonsense beginning with '-' as the directory stuff is handled elsewhere. Will be included in next release. Note to self: should really move this to a proper option parser.

No comments: