diff --git a/cps/server.py b/cps/server.py index 45673102..14ab0c37 100644 --- a/cps/server.py +++ b/cps/server.py @@ -153,7 +153,7 @@ class WebServer(object): # The value of __package__ indicates how Python was called. It may # not exist if a setuptools script is installed as an egg. It may be # set incorrectly for entry points created with pip on Windows. - if getattr(__main__, "__package__", "") == "" or ( + if getattr(__main__, "__package__", "") in ["", None] or ( os.name == "nt" and __main__.__package__ == "" and not os.path.exists(py_script)