[Zope-CVS] CVS: Products/ExternalEditor - zopeedit.py:1.15

Casey Duncan casey@zope.com
Tue, 11 Jun 2002 12:00:49 -0400


Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv25391

Modified Files:
	zopeedit.py 
Log Message:
Added check for ssl support


=== Products/ExternalEditor/zopeedit.py 1.14 => 1.15 ===
             self.clean_up = int(self.options.get('cleanup_files', 1))
             if self.clean_up: os.remove(input_file)
+            
+            if self.ssl:
+                # See if our Python build supports ssl
+                try:
+                    from socket import ssl
+                except ImportError:
+                    fatalError('SSL support is not available on this system. '
+                               'Make sure openssl is installed '
+                               'and reinstall Python.')
         except:
             # for security, always delete the input file even if
             # a fatal error occurs, unless explicitly stated otherwise
@@ -360,7 +369,7 @@
             
             response = NullResponse()
             response.reason = sys.exc_info()[1]
-            sys.stderr.write('\n -- Zope Request Traceback --\n')
+            sys.stderr.write('\n-- Zope Request Traceback --\n')
             traceback.print_exc(file=sys.stderr)
             
             try: