]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #695250: Suppress COPYRIGHT if site.py is not read. Fixes #672614.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Mar 2003 17:00:39 +0000 (17:00 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 30 Mar 2003 17:00:39 +0000 (17:00 +0000)
Will backport to 2.2.

Modules/main.c

index 80c50b008304e73352dc82663f57acbc6004aff6..056a6b6fe3fbb9c7c5a3ccdda1b04153380ea294 100644 (file)
@@ -370,9 +370,12 @@ Py_Main(int argc, char **argv)
        Py_Initialize();
 
        if (Py_VerboseFlag ||
-           (command == NULL && filename == NULL && stdin_is_interactive))
-               fprintf(stderr, "Python %s on %s\n%s\n",
-                       Py_GetVersion(), Py_GetPlatform(), COPYRIGHT);
+           (command == NULL && filename == NULL && stdin_is_interactive)) {
+               fprintf(stderr, "Python %s on %s\n",
+                       Py_GetVersion(), Py_GetPlatform());
+               if (!Py_NoSiteFlag)
+                       fprintf(stderr, "%s\n", COPYRIGHT);
+       }
 
        if (command != NULL) {
                /* Backup _PyOS_optind and force sys.argv[0] = '-c' */