Commits

Jason R. Coombs committed 54ca9ad

Fixed NameError in editor when editor process returns non-zero.

Comments (0)

Files changed (1)

jaraco/util/editor.py

 import mimetypes
 import collections
 
+class EditProcessException(RuntimeError): pass
+
 class EditableFile(object):
 	"""
 	EditableFile saves some data to a temporary file, launches a
 				print(e)
 				return
 			if res != 0:
-				raise RuntimeException('Editor process returned non-zero.')
+				msg = '%(editor)s returned error status %(res)d' % vars()
+				raise EditProcessException(msg)
 			new_data = self.read()
 			if new_data != self.data:
 				self.changed = True