Changeset 2521


Ignore:
Timestamp:
Oct 29, 2009, 1:36:37 AM (15 years ago)
Author:
price
Message:

main.fcgi: usage, fix a bit of spacing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/main.fcgi

    r2484 r2521  
    1010base_dir = os.path.dirname(__file__)
    1111
    12 if __name__=="__main__":
     12def usage():
     13    print >>sys.stderr, """%s [config]
     14
     15Run server as FastCGI, with CherryPy config from "main.conf".
     16
     17With `config`, run standalone with CherryPy config from `config`.
     18""" % sys.argv[0]
     19    sys.exit(2)
     20
     21if __name__ == "__main__":
    1322    static_dir = os.path.join(base_dir, 'static')
    1423
     24    if len(sys.argv) > 2:
     25        usage()
    1526    if len(sys.argv) > 1:
     27        if sys.argv[1] in ('-h', '--help'):
     28            usage()
    1629        conf_file = sys.argv[1]
    1730        dev = True
Note: See TracChangeset for help on using the changeset viewer.