Changeset 2702 for package_branches


Ignore:
Timestamp:
Dec 20, 2009, 9:46:25 PM (14 years ago)
Author:
broder
Message:

main.fcgi: usage, fix a bit of spacing

File:
1 edited

Legend:

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

    r2692 r2702  
    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.