diff options
-rwxr-xr-x | mgagnome | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -265,30 +265,6 @@ def distinct(iterable, keyfunc=None): seen.add(key) yield item -def call_editor(filename): - """Return a sequence of possible editor binaries for the current platform""" - - editors = [] - - for varname in 'VISUAL', 'EDITOR': - if varname in os.environ: - editors.append(os.environ[varname]) - - editors.extend(('/usr/bin/editor', 'vi', 'pico', 'nano', 'joe')) - - for editor in editors: - try: - ret = subprocess.call([editor, filename]) - except OSError as exc: - if exc.errno == 2: - continue - raise - - if ret == 127: - continue - - return True - class URLLister(HTMLParser): """Parse links from HTML""" # pylint: disable=abstract-method |